44 lines
1.1 KiB
C#
44 lines
1.1 KiB
C#
using System.Collections;
|
|
using System.Linq;
|
|
|
|
namespace _2023._09._27;
|
|
|
|
class Program
|
|
{
|
|
|
|
static void Feladat()
|
|
{
|
|
string path = @"E:\Suli\12.b\Programozás (Tusjak Brigitta)\Források\tanulók.txt";
|
|
List<string> vnev = new List<string>();
|
|
List<string> knev = new List<string>();
|
|
List<string> magassag = new List<string>();
|
|
List<string> suly = new List<string>();
|
|
List<string> nem = new List<string>();
|
|
|
|
using (FileStream f = new FileStream(path, FileMode.Open, FileAccess.Read))
|
|
{
|
|
StreamReader r = new StreamReader(f);
|
|
string sor = r.ReadLine();
|
|
|
|
while (sor != null)
|
|
{
|
|
string[] elemek = sor.Split(";");
|
|
vnev.Add(elemek[0]);
|
|
knev.Add(elemek[1]);
|
|
magassag.Add(elemek[2]);
|
|
suly.Add(elemek[3]);
|
|
nem.Add(elemek[4]);
|
|
sor = r.ReadLine();
|
|
}
|
|
System.Console.WriteLine("Kész!");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
static void Main(string[] args)
|
|
{
|
|
Feladat();
|
|
}
|
|
}
|