3 // Copyright (c) Microsoft Corporation. All rights reserved.
6 /*=============================================================================
8 ** Class: IndexOutOfRangeException
11 ** Purpose: Exception class for invalid array indices.
14 =============================================================================*/
19 using System.Runtime.Serialization;
20 [System.Runtime.InteropServices.ComVisible(true)]
22 public sealed class IndexOutOfRangeException : SystemException {
23 public IndexOutOfRangeException()
24 : base(Environment.GetResourceString("Arg_IndexOutOfRangeException")) {
25 SetErrorCode(__HResults.COR_E_INDEXOUTOFRANGE);
28 public IndexOutOfRangeException(String message)
30 SetErrorCode(__HResults.COR_E_INDEXOUTOFRANGE);
33 public IndexOutOfRangeException(String message, Exception innerException)
34 : base(message, innerException) {
35 SetErrorCode(__HResults.COR_E_INDEXOUTOFRANGE);
38 internal IndexOutOfRangeException(SerializationInfo info, StreamingContext context) : base(info, context) {