Answer the question
In order to leave comments, you need to log in
What happens if after the delimiter comes the next delimiter in c# in the split method?
I have an array of delimiters. And a line with 2 delimiters in a row. Why does it give me 2 spaces?
char[] separators = new char[] {','};
string str = "2,,";
string[] outp = str.Split(separators);
Console.WriteLine(outp.Length);
for (int i = 0; i < outp.Length; i++)
{
Console.WriteLine(outp[i]);
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question