Updates referencesource to .NET 4.7
[mono-project.git] / mcs / class / referencesource / mscorlib / system / io / endofstreamexception.cs
blobb0cd0d1c9eae309ce00f809fe65ed82dad76b554
1 // ==++==
2 //
3 // Copyright (c) Microsoft Corporation. All rights reserved.
4 //
5 // ==--==
6 /*============================================================
7 **
8 ** Class: EndOfStreamException
9 **
10 ** <OWNER>Microsoft</OWNER>
13 ** Purpose: Exception to be thrown when reading past end-of-file.
16 ===========================================================*/
18 using System;
19 using System.Runtime.Serialization;
21 namespace System.IO {
22 [Serializable]
23 [System.Runtime.InteropServices.ComVisible(true)]
24 public class EndOfStreamException : IOException
26 public EndOfStreamException()
27 : base(Environment.GetResourceString("Arg_EndOfStreamException")) {
28 SetErrorCode(__HResults.COR_E_ENDOFSTREAM);
31 public EndOfStreamException(String message)
32 : base(message) {
33 SetErrorCode(__HResults.COR_E_ENDOFSTREAM);
36 public EndOfStreamException(String message, Exception innerException)
37 : base(message, innerException) {
38 SetErrorCode(__HResults.COR_E_ENDOFSTREAM);
41 protected EndOfStreamException(SerializationInfo info, StreamingContext context) : base (info, context) {