How to Join multiple strings into a single Delimited String


If you have an array of Strings in your program and you want to join all the elements into a single delimited string you can use Join method of String class as follows:

string[] numbers = { "255", "10", "10", "70"};
string ip = String.Join(".", numbers);

Console.WriteLine(ip);        // will output 255.10.10.70

 

 

About author


User avatar

Waqas Anwar

Founder of EzzyLearning.com, Senior Consultant, Microsoft .NET and Web Technologies

Add Comment