auto lista
This commit is contained in:
36
BaratLista/Program.cs
Normal file
36
BaratLista/Program.cs
Normal file
@@ -0,0 +1,36 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.IO;
|
||||
|
||||
namespace BaratLista {
|
||||
public class Program {
|
||||
|
||||
public static void beolvas() {
|
||||
|
||||
}
|
||||
|
||||
static void Main(string[] args) {
|
||||
List<Barat> baratok = new List<Barat>();
|
||||
|
||||
StreamReader reader = new StreamReader("baratok.txt", Encoding.Default);
|
||||
int c = 0;
|
||||
while(!reader.EndOfStream) {
|
||||
if (c % 100000 == 0) Console.WriteLine(c);
|
||||
c++;
|
||||
string input = reader.ReadLine();
|
||||
string[] adatok = input.Split(',');
|
||||
baratok.Add(new Barat(adatok[0], DateTime.Parse(adatok[1]), adatok[2], Convert.ToInt32(adatok[3])));
|
||||
}
|
||||
|
||||
for (int i = 0; i < baratok.Count; i++) {
|
||||
if (c % 100000 == 0)
|
||||
baratok[i].kiir();
|
||||
}
|
||||
|
||||
Console.ReadKey();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user