Bump corefx
[mono.git] / mcs / class / referencesource / mscorlib / system / indexoutofrangeexception.cs
1 // ==++==
2 // 
3 //   Copyright (c) Microsoft Corporation.  All rights reserved.
4 // 
5 // ==--==
6 /*=============================================================================
7 **
8 ** Class: IndexOutOfRangeException
9 **
10 **
11 ** Purpose: Exception class for invalid array indices.
12 **
13 **
14 =============================================================================*/
15
16 namespace System {
17     
18     using System;
19     using System.Runtime.Serialization;
20 [System.Runtime.InteropServices.ComVisible(true)]
21     [Serializable]
22     public sealed class IndexOutOfRangeException : SystemException {
23         public IndexOutOfRangeException() 
24             : base(Environment.GetResourceString("Arg_IndexOutOfRangeException")) {
25             SetErrorCode(__HResults.COR_E_INDEXOUTOFRANGE);
26         }
27     
28         public IndexOutOfRangeException(String message) 
29             : base(message) {
30             SetErrorCode(__HResults.COR_E_INDEXOUTOFRANGE);
31         }
32         
33         public IndexOutOfRangeException(String message, Exception innerException) 
34             : base(message, innerException) {
35             SetErrorCode(__HResults.COR_E_INDEXOUTOFRANGE);
36         }
37
38         internal IndexOutOfRangeException(SerializationInfo info, StreamingContext context) : base(info, context) {
39         }
40
41     }
42
43 }