Menu:

FileStream Open File [C#]

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 and FileAccess enumerations as parameters.

FileStream typical use

This is typical code when opening file using FileStream. It's important to
always close the stream. If you don't close the stream it can take a minute to
be file again accessible (it will wait to garbage collector to free the
FileStream instance and close the file).