Can you suggest a short way on how to separate the user input with a semicolon, and the store it into an array.
The line when a user is entering words should look like this.
First;Second;Third;Forth
Can you suggest a short way on how to separate the user input with a semicolon, and the store it into an array.
The line when a user is entering words should look like this.
First;Second;Third;Forth
Assuming the user input is placed in raw_input
variable
string[] input = raw_input.Split(';');
You can use Regex
to split input, like following.
string input = "First;Second;Third;Forth";
string[] results = System.Text.RegularExpressions.Regex.Split(input,";");