A
andrewcw
The split function takes as a parameter what I understand
as array of Char.
I can define the delimiter like this:
string [] innerText = new string[2];
char[] chSplit={'='};
innerText=tempText.Split(chSplit);
But if I try this ( to make the delimiter a variable ):
char foo =Convert.ToChar(delim.Substring(0,1));
chSplit[0]=foo;
I get a compile error saying "use of unassigned local
variable chSplit"
Please explain to me what is happening and what should be
done. Thanks !
as array of Char.
I can define the delimiter like this:
string [] innerText = new string[2];
char[] chSplit={'='};
innerText=tempText.Split(chSplit);
But if I try this ( to make the delimiter a variable ):
char foo =Convert.ToChar(delim.Substring(0,1));
chSplit[0]=foo;
I get a compile error saying "use of unassigned local
variable chSplit"
Please explain to me what is happening and what should be
done. Thanks !