Main Site Documentation

String split function


#1

Hi guys,

Is there a String.split function avaliable in .netmf? I’m struggling to find one.

What would you guys do to split a string of comma seperated values into a string array?

(Appart from a while loop adding characters to the string going through it character by character - surely there must be a simpler way?)


#2

Yes, there is.

String.Split()


#3

Which assembly is that in? I really can’t find it. System.String doesn’t seem to contain split, am I missing a reference?


#4
            string MyString = "abc,def";
            string[] MyArray = MyString.Split(',');


#5

Thanks :slight_smile:


#6

It is in mscorlib.dll