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