Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.IO;
- namespace nyilvantartas
- {
- class adatok
- {
- public string nev;
- public int telefonszam;
- public int dbszam;
- public string eloe;
- public int napja;
- public adatok(string sor)
- {
- string[] elemek = sor.Split(';');
- nev = (elemek[0]);
- telefonszam= int.Parse(elemek[1]);
- dbszam = int.Parse(elemek[2]);
- eloe = (elemek[3]);
- napja = int.Parse(elemek[4]);
- }
- }
- class Program
- {
- static void Main(string[] args)
- {
- List<adatok> nyilvantartas = new List<adatok>();
- foreach (var i in File.ReadAllLines("rendeles.txt").Skip(1))
- {
- nyilvantartas.Add(new adatok(i));
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement