public void FillFromFile(string filePath) { List <string[]> fileContent = FileUtil.ReadFile(filePath); foreach (var row in fileContent) { DateTime birthDate = DateTime.Parse(row[1]); Kolni kolni = (Kolni)Enum.Parse(typeof(Kolni), row[2]); double alcoholConsumed = double.Parse(row[3]); Locsolkodo person = new Locsolkodo( name: row[0], birthDate: birthDate, kolni: kolni, alcoholConsumed: alcoholConsumed); AddPerson(person); } }
public List <Locsolkodo> PeopleWithKolni(Kolni kolni) { return(locsolkodok.Where(ember => ember.KolniViz == kolni).ToList()); }