Skip to main content
๐Ÿ“œ WAYPOINT LESSON

Checkpoint โ€” Files

โญ beginnerโณ 20 min read๐Ÿ“ Lesson 57 of 85

A notes store: append, load with a lenient corrupt-line policy, and search โ€” durable across process restarts.

Checkpoint: the notes store

Task: implement in Solution a tiny notes store over id|title|body lines:

  1. static int SaveNote(string path, int nextId, string title, string body) โ€” appends nextId|title|body as one line and returns nextId + 1 (the caller's running id).
  2. static List<(int Id, string Title, string Body)> LoadNotes(string path) โ€” parses the file; malformed lines skipped; missing file โ†’ empty list.
  3. static List<(int Id, string Title, string Body)> Search(List<(int Id, string Title, string Body)> notes, string term) โ€” notes whose title OR body contains term (case-insensitive), preserving order.