hey, i want to save this text in my code, but it doesnt work. i dont know how i can change my code so, that i read more as the first line.
Mehmet;Demirayak;IT
1
Emre;Araz;Sekten Chef
1
Nusret;Beganovic;Kein Geld
2
Ferhat;Acer;Acer Computer
2
Fevzi;Uzun;Trabzo
and thats my code
public void read()
{
StreamReader sr = new StreamReader(datei);
string s;
int i = 0;
while ((s = sr.ReadLine()) != null)
{
string[] l = s.Split(";");
if(s.StartsWith("1") || s.StartsWith("2"))
{
p[i] = new Personen(l[0], l[1], l[2]);
Console.WriteLine(p[i]);
i++;
}
}
}