public void populateLecturerList(string s) { StreamReader myFile = new StreamReader(s); string myString = myFile.ReadToEnd(); string[] linije = Regex.Split(myString, "\r\n"); int ID = 0; foreach (string linija in linije) { string[] info = linija.Split(' '); int brKolegija = info.Length - 2; List<string> kolegiji = new List<string>(); for (int i = 0; i < brKolegija; i++) { kolegiji.Add(info[2 + i]); } Lecturer tmp = new Lecturer(ID, info[0], kolegiji, Convert.ToInt32(info[1])); ID++; LecturerList.Add(tmp); //Console.Write(info[1]); } myFile.Close(); }
public void setLecturer(Lecturer l) { Lec = l; }