February 11, 2016
How to Join Two Strings in C#/CSharp
To join strings in C#/CSharp, we make use of Concat method. Example is given below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
using System; namespace Hello_World { class Program { static void Main(string[] args) { string hello = "Hello "; string world = " World!"; string final = string.Concat(hello, world); Console.WriteLine(final); } } } |