Type Summary

						public class EndOfStreamException : IOException
 {
   // Constructors
      public EndOfStreamException ();
      public EndOfStreamException (string message);
      public EndOfStreamException (string message,
                                  Exception innerException);
MS CF
						protected EndOfStreamException (SerializationInfo info,
                                     StreamingContext context);
 }

BA Our general rule on the use of Exceptions is that they are to be used in exceptional situations only. By exceptional we mean situations that the client will very likely have to write special case error handling code. So, is reading to the end of a stream an exceptional situation? Not if you are reading byte-by-byte through the stream; in such a case you always read the end of the stream, so that is not an exceptional situation. ...

Get .NET Framework Standard Library Annotated Reference, Volume 1: Base Class Library and Extended Numerics Library now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.