Tuesday, February 23, 2010

Name some classes in the .NET Framework that derive from the Stream Class

The following classes all have the Stream class as a base class.
  • FileStream
  • MemoryStream
  • CryptoStream
  • NetworkStream
  • GZipStream
By having a common base class, one is guaranteed that a certain set of properties and methods are available. So in this case, if your code only uses the methods of the stream class, then you can work with data from ANY stream data source.

Additional Resources
System.IO.FileStream
System.IO.MemoryStream
System.Security.Cryptography.CryptoStream
System.Net.Sockets.NetworkStream
System.IO.Compression.GZipStream

No comments:

Post a Comment