Concatenation is the process of appending one string to the end of another. In C#, any two strings can be concatenated using the +
operator.
The code snippet below illustrates the process of concatenating two strings in C#:
class HelloWorld { static void Main() { string FirstString = "Hello"; string SecondString = "World"; string ConcatenatedString = FirstString + SecondString; System.Console.WriteLine(ConcatenatedString); } }
RELATED TAGS
View all Courses