c# add strings
string value = "cat ";
// Step 1: append a word to the string.
value += "and ";
Console.WriteLine(value);
// Step 2: append another word.
value += "dog";
Console.WriteLine(value);
//OUTPUT:
cat and
cat and dog
c# add strings
string value = "cat ";
// Step 1: append a word to the string.
value += "and ";
Console.WriteLine(value);
// Step 2: append another word.
value += "dog";
Console.WriteLine(value);
//OUTPUT:
cat and
cat and dog
c# string concatenation
string userName = "<Type your name here>";
string dateString = DateTime.Today.ToShortDateString();
// Use the + and += operators for one-time concatenations.
string str = "Hello " + userName + ". Today is " + dateString + ".";
System.Console.WriteLine(str);
str += " How are you today?";
System.Console.WriteLine(str);
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us