public void AddNote(Note note) { ESchoolDiaryData.Notes.Add(note); }
private static void LoadNotes() { string filePath = @"../../Data/students_notes.txt"; StreamReader reader = new StreamReader(filePath); using (reader) { string currentLine = reader.ReadLine(); while (currentLine != null) { string[] currentLineArray = currentLine.Split('#'); Note currentNote = new Note(long.Parse(currentLineArray[0]), currentLineArray[1]); ESchoolDiaryData.Notes.Add(currentNote); currentLine = reader.ReadLine(); } } }