Convert a string array to comma separated string

Saratvaddilli
Posted by Saratvaddilli under C# category on | Points: 40 | Views : 1155
 protected void Page_Load(object sender, EventArgs e)
{
Commaseparatedstring();
}

private void Commaseparatedstring()
{
string[] numbers = { "123", "234", "345", "456", "567", "789" };
string numbersstring = String.Join(",", numbers);
Response.Write(numbersstring);
}

Comments or Responses

Login to post response