M
Mark Fox
Hello,
The string.Split method is very useful for splitting
strings that use a single character as a delimiter. i.e.:
string str = "First;Second;Third";
string[] strArray = str.Split(new char[] {';'});
But I am having trouble getting the Split method to split
a string with a delimiter of more than one character.
What is the correct syntax?
string str = "First<;>Second<;>Third";
// This does not work, it gives an "Unhandled Exception
// of type 'System.ExecutionEngineException' in
// mscorlib.dll"
string[] strArray = str.Split(new char[] {'<',';','>'});
Thanks!
The string.Split method is very useful for splitting
strings that use a single character as a delimiter. i.e.:
string str = "First;Second;Third";
string[] strArray = str.Split(new char[] {';'});
But I am having trouble getting the Split method to split
a string with a delimiter of more than one character.
What is the correct syntax?
string str = "First<;>Second<;>Third";
// This does not work, it gives an "Unhandled Exception
// of type 'System.ExecutionEngineException' in
// mscorlib.dll"
string[] strArray = str.Split(new char[] {'<',';','>'});
Thanks!