Concatenate or Add Two Strings in C# – C# Programming Example
Basic C# Console

Concatenate or Add Two Strings in C#

You can merge/concatenate/combine two C# String fields using the +operator, as shown in this example code:

Output:

The String fullName now contains “TomBrown“. Note that there is no space between “Tom” and “Brown” because I didn’t put a space in there.

One way to add a space to the new string is to put one in there, as shown in this example:

Output:

 

 

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: