e.g.
Use Split to separate parts from a string. If your input is "A B C", split on the space to get an array of "A", "B" and "C".<
string str = "1,2,3,4";
// 1st way
string[] strArray = str.Split(new char[] { ',' });
int[] intArray = new int[strArray.Length];
for (int i = 0; i < strArray.Length; i++)
{
intArray[i] = int.Parse(strArray[i]);
}
// 2nd way
string[] array = str.Split(new string[] { "," }, StringSplitOptions.RemoveEmptyEntries);