public ClassDef(string cName, int mAttendants) { ID = Guid.NewGuid(); ClassName = cName; MinAttendants = mAttendants; Hosts = new List <Teacher>(); Students = new List <Student>(); AllClasses.Add(this); }
/// <summary>Parses array of string into a AllClasses object </summary> /// <param name="allCsvRows">All rows of csv file</param> /// <returns>object of AllClasses object</returns> public static AllClasses ParseHomeWorkTrackerCsvFile(string[] allCsvRows) { var newClasses = new AllClasses(); foreach (var currentRow in allCsvRows) { var currentLine = currentRow.Split(Commas.ToCharArray()); var newCourse = buildNewCourse(currentLine); newClasses.Add(newCourse); } return(newClasses); }