I am kinda new to C#. A problem when using split. I thought it returned a string array. But once it gets to the last line below it crashes and says I cant access it. Out of bounds. Even though in the split it would have found multiple '~'. Any solutions to my problem?
String tempString = " ";
while ((tempString = streamReader.ReadLine()) != null)
{
String [] split = tempString.Split('~');
typeOfVehicle = split[0];
manufactuer = split[1];
Thanks very much
Question solved.
split.Lengthto see how many (and what) elements are actually in the array?