splitting a string based on multiple char delimiters

Use string.Split(char [])

string strings = "4,6,8\n9,4";
string [] split = strings .Split(new Char [] {',' , '\n' });

EDIT

Try following if you get any unnecessary empty items. String.Split Method (String[], StringSplitOptions)

string [] split = strings .Split(new Char [] {',' , '\n' }, 
                                 StringSplitOptions.RemoveEmptyEntries);

EDIT2

This works for your updated question. Add all the necessary split characters to the char [].

string [] split = strings.Split(new Char[] { ',', '\\', '\n' },
                                 StringSplitOptions.RemoveEmptyEntries);

Leave a Comment