venus najad

venus najad

  • 1k
  • 414
  • 28.2k

Split doesnt work??!!

Feb 24 2019 9:45 AM
hello... my split doesnt work...
 
while ((p0 = sr.ReadLine()) != null)
{
var p = p0.Split(' ');
Console.WriteLine(p[0], p[1], p[2], p[3], p[4], p[5], p[6], p[7]);
}
it prints only p[0]??!!
i put each element in other varibales but it complins on the index, because in my textfile i have only 5 rows... it takes only first word from each row??!!
what is my misstake? i appreciate any help 
 

Answers (8)