This example shows how to open files for reading or writing, how to load and save files using FileStream in C#. To open file create instance of FileStream
class with FileMode
enumerations as parameters.
FileStream fileStream = new FileStream(@"c:\file.txt", FileMode.Open);
// read from file or write to file