SHARE
TWEET

Untitled

a guest Dec 12th, 2019 83 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using System.IO;
  7.  
  8. namespace nyilvantartas
  9. {
  10.     class adatok
  11.     {
  12.         public string nev;
  13.         public int telefonszam;
  14.         public int dbszam;
  15.         public string eloe;
  16.         public int napja;
  17.         public adatok(string sor)
  18.         {
  19.             string[] elemek = sor.Split(';');
  20.             nev = (elemek[0]);
  21.             telefonszam= int.Parse(elemek[1]);
  22.             dbszam = int.Parse(elemek[2]);
  23.             eloe = (elemek[3]);
  24.             napja = int.Parse(elemek[4]);
  25.         }
  26.  
  27. }
  28. class Program
  29.     {
  30.         static void Main(string[] args)
  31.         {
  32.             List<adatok> nyilvantartas = new List<adatok>();
  33.             foreach (var i in File.ReadAllLines("rendeles.txt").Skip(1))
  34.             {
  35.                 nyilvantartas.Add(new adatok(i));
  36.                
  37.             }
  38.         }
  39.     }
  40.    
  41. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top