Skip to main content

Practice · 1 of 4

Write, read, and overwrite

CHALLENGE
Difficulty: beginner+25 XP

Implement static void WriteNote(string path, string note) (create parent directory if missing, overwrite the file with the note text) and static string ReadNote(string path) (return the file's text; FileNotFoundException when the file doesn't exist).

Back to lesson: Practice: File I/O workout