[C#] StringSplitOptions
9 novembre 2009
Nessun commento
If you need to split strings, remember to use StringsplitOptions Enumeration.
string myString = "one,two, , ,five"; string[] myArray = myString.Split(charSeparators, StringSplitOptions.RemoveEmptyEntries);
In myArray we have this:
- one
- two
- five
string myString = "one,two, , ,five"; string[] myArray = myString.Split(charSeparators, StringSplitOptions.None);
In myArray we have this:
- one
- two
-
-
- five