Im trying to split a String into an Array. In PHP I normally use explode -> profit. But I cant get it to work in C# …
string fuel = "08,02,22,97,38,15";
string[] numbers = fuel.Split(new char[] { ',' });
He just splits on every character, fe: numbers[0]=0 and numbers[1]=8
What am I doing wrong?
EDIT: I used the fuel string as fuel[0] which gives the first char, hence the mistake. It shouldve been numbers[0] stupid mistake!
Here – look at this http://ideone.com/dYxaa