Module 4 began by comparing decimal, binary, and hexadecimal.
Base 10.
Digits:
A simple C# write is:
System.IO.File.WriteAllText("lineup.txt", lineupNote);Conceptually:
WriteAllText writes the supplied text as the file's complete content.
A simple C# read is:
string lineupNote =
System.IO.File.ReadAllText("lineup.txt");Conceptually:
The file remains persistent.
The program now also has the contents available in memory.
A Player object may contain several fields.
Writing a text file stores only the text the program chooses to write.
Reading a text file returns text.
Turning complex object state into a structured file representation is a separate problem.
That work is outside the current module.
A simple save process can be represented as:
A load process can be represented as:
The diagram shows the process.
C# supplies the executable instructions.
The major progression is:
Represent values → Identify their types → Model class structure → Distinguish runtime memory from persistent storage → Write information → Read information
These ideas connect representation and storage.
A digital system needs both: