EndOfStreamException.cs 1.1 KB

123456789101112131415161718192021222324252627282930313233343536
  1. // Licensed to the .NET Foundation under one or more agreements.
  2. // The .NET Foundation licenses this file to you under the MIT license.
  3. // See the LICENSE file in the project root for more information.
  4. using System.Runtime.Serialization;
  5. namespace System.IO
  6. {
  7. [Serializable]
  8. [System.Runtime.CompilerServices.TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
  9. public class EndOfStreamException : IOException
  10. {
  11. public EndOfStreamException()
  12. : base(SR.Arg_EndOfStreamException)
  13. {
  14. HResult = HResults.COR_E_ENDOFSTREAM;
  15. }
  16. public EndOfStreamException(string message)
  17. : base(message)
  18. {
  19. HResult = HResults.COR_E_ENDOFSTREAM;
  20. }
  21. public EndOfStreamException(string message, Exception innerException)
  22. : base(message, innerException)
  23. {
  24. HResult = HResults.COR_E_ENDOFSTREAM;
  25. }
  26. protected EndOfStreamException(SerializationInfo info, StreamingContext context)
  27. : base(info, context)
  28. {
  29. }
  30. }
  31. }