Overview
- Provides a file-specific implementation of a Stream.
Good practice
- Remember to call Close on a stream.
Examples
Read a File
// FileStream is simply a stream around a file, overriding Stream methods
FileStream a = new FileStream(@"C:\Public\Test.txt", FileMode.Open);
while (a.Position != a.Length)
{
Console.Write((char)a.ReadByte());
}
a.Close();
You May Also Like

Exam 70-536 Study Notes
My study notes for Microsoft exam 70-536: .NET types, collections, generics, I/O, serialization and more, with C# examples.

Starting Exam 70-536 Study
After a burnout, I'm putting my own project on hold to study for Microsoft exam 70-536.

Design Patterns - Proxy Pattern
The Proxy Pattern, and the last article in the design patterns series, now that I've finished reading Head First Design Patterns.




