Guest User

Untitled

a guest
Jul 6th, 2018
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.95 KB | None | 0 0
  1. string[] str = new string[count];
  2. {
  3. using (StreamReader sr = new StreamReader("База.txt"))
  4. {
  5. String line;
  6. int i = 0;
  7. while ((line = sr.ReadLine()) != null) //читаем по одной линии(строке) пока не вычитаем все из потока (пока не достигнем конца файла)
  8. {
  9. str[i++] = line;
  10. }
  11. }
  12. }
  13. spisok = new Blank[count];
  14.  
  15. for (int i=0; i<count; i++)
  16. {
  17. string[] a = str[i].Split(';');
  18. spisok[0].FIO = a[0];
  19. spisok[0].Kurs = a[1];
  20. spisok[0].Mesto= a[2];
  21. spisok[0].Vid = a[3];
  22. spisok[0].Nachalo = a[4];
  23. spisok[0].Konec = a[5];
  24. spisok[0].Ruk = a[6];
  25. }
  26.  
  27. StreamReader sr = new StreamReader("База.txt", System.Text.Encoding.Default)
Add Comment
Please, Sign In to add comment