//create a dimensional TimetableCells list "ttDimensionList" and compose TimetableCells ttCells; //save ttCells into ttDimensionList public Room defaultValue(Room newRoom) { for (int i = 0; i < 5; i++) { for (int j = 0; j < 9; j++) { TimetableCells newttCells = new TimetableCells(); newRoom.TtDimensionArray[i][j] = newttCells; } } //SystemList.RoomsList.Add(newRoom); return(newRoom); }
//private List<string> moduleName; //private int[,] cells = new int[5,9]; //private TimetableCells cell; //private TimeCellHours timeCell; //private Lecturer lecturerID; //private Module moduleID; public Room() { RoomSize = 20; RoomName = ""; TtDimensionArray = new TimetableCells[5][]; for (int i = 0; i < 5; i++) { ttDimensionArray[i] = new TimetableCells[9]; for (int j = 0; j < 9; j++) { TimetableCells newttCells = new TimetableCells(); TtDimensionArray[i][j] = newttCells; } } }