How to read the comma seperated values from a string asp.net C#?

string myString = "A, B, C, D";
string delimStr = " ,";
char[] delimiter = delimStr.ToCharArray();
foreach (string s in myString.Split(delimiter))
{
Response.Write (s.ToString ()+ "
");
}

0 comments :

Post a Comment