Splitting a string using a delimiter

suggest change

Use the System.String.Split method to return a string array that contains substrings of the original string, split based on a specified delimiter:

string sentence = "One Two Three Four";
string[] stringArray = sentence.Split(' ');

foreach (string word in stringArray)


One Two Three Four

Feedback about page:

Optional: your email if you want me to get back to you:

Table Of Contents