Concat Array Items into a String in C# 4.0

Madhu.b.rokkam
Posted by Madhu.b.rokkam under C# category on | Points: 40 | Views : 3088
static void Main(string[] args)
{

string[] values = { "Ram", "Shyam", "Gopal" };
Console.WriteLine(String.Concat(values));

int[] nums = { 0, 9, 8, 7, 6, 5, 4, 3, 2, 1 };
Console.WriteLine(String.Concat(nums));

Console.Read();
}


Result

RamShyamGopal
0987654321

Comments or Responses

Login to post response