mscorlib(4.0.0.0) API with additions
System.ArgumentOutOfRangeException Class Reference

The exception that is thrown when the value of an argument is outside the allowable range of values as defined by the invoked method. More...

Inheritance diagram for System.ArgumentOutOfRangeException:
[legend]
Collaboration diagram for System.ArgumentOutOfRangeException:
[legend]

Public Member Functions

 ArgumentOutOfRangeException ()
 Initializes a new instance of the T:System.ArgumentOutOfRangeException class. More...
 
 ArgumentOutOfRangeException (string paramName)
 Initializes a new instance of the T:System.ArgumentOutOfRangeException class with the name of the parameter that causes this exception. More...
 
 ArgumentOutOfRangeException (string paramName, string message)
 Initializes a new instance of the T:System.ArgumentOutOfRangeException class with the name of the parameter that causes this exception and a specified error message. More...
 
 ArgumentOutOfRangeException (string message, Exception innerException)
 Initializes a new instance of the T:System.ArgumentOutOfRangeException class with a specified error message and the exception that is the cause of this exception. More...
 
 ArgumentOutOfRangeException (string paramName, object actualValue, string message)
 Initializes a new instance of the T:System.ArgumentOutOfRangeException class with the parameter name, the value of the argument, and a specified error message. More...
 
override void GetObjectData (SerializationInfo info, StreamingContext context)
 Sets the T:System.Runtime.Serialization.SerializationInfo object with the invalid argument value and additional exception information. More...
 
- Public Member Functions inherited from System.ArgumentException
 ArgumentException ()
 Initializes a new instance of the T:System.ArgumentException class. More...
 
 ArgumentException (string message)
 Initializes a new instance of the T:System.ArgumentException class with a specified error message. More...
 
 ArgumentException (string message, Exception innerException)
 Initializes a new instance of the T:System.ArgumentException class with a specified error message and a reference to the inner exception that is the cause of this exception. More...
 
 ArgumentException (string message, string paramName, Exception innerException)
 Initializes a new instance of the T:System.ArgumentException class with a specified error message, the parameter name, and a reference to the inner exception that is the cause of this exception. More...
 
 ArgumentException (string message, string paramName)
 Initializes a new instance of the T:System.ArgumentException class with a specified error message and the name of the parameter that causes this exception. More...
 
override void GetObjectData (SerializationInfo info, StreamingContext context)
 Sets the T:System.Runtime.Serialization.SerializationInfo object with the parameter name and additional exception information. More...
 
- Public Member Functions inherited from System.SystemException
 SystemException ()
 Initializes a new instance of the T:System.SystemException class. More...
 
 SystemException (string message)
 Initializes a new instance of the T:System.SystemException class with a specified error message. More...
 
 SystemException (string message, Exception innerException)
 Initializes a new instance of the T:System.SystemException class with a specified error message and a reference to the inner exception that is the cause of this exception. More...
 
- Public Member Functions inherited from System.Exception
 Exception ()
 Initializes a new instance of the T:System.Exception class. More...
 
 Exception (string message)
 Initializes a new instance of the T:System.Exception class with a specified error message. More...
 
 Exception (string message, Exception innerException)
 Initializes a new instance of the T:System.Exception class with a specified error message and a reference to the inner exception that is the cause of this exception. More...
 
virtual Exception GetBaseException ()
 When overridden in a derived class, returns the T:System.Exception that is the root cause of one or more subsequent exceptions. More...
 
override string ToString ()
 Creates and returns a string representation of the current exception. More...
 
new Type GetType ()
 Gets the runtime type of the current instance. More...
 
- Public Member Functions inherited from System.Runtime.InteropServices._Exception
new bool Equals (object obj)
 Provides COM objects with version-independent access to the M:System.Object.Equals(System.Object) method. More...
 
new int GetHashCode ()
 Provides COM objects with version-independent access to the M:System.Object.GetHashCode method. More...
 

Protected Member Functions

 ArgumentOutOfRangeException (SerializationInfo info, StreamingContext context)
 Initializes a new instance of the T:System.ArgumentOutOfRangeException class with serialized data. More...
 
- Protected Member Functions inherited from System.ArgumentException
 ArgumentException (SerializationInfo info, StreamingContext context)
 Initializes a new instance of the T:System.ArgumentException class with serialized data. More...
 
- Protected Member Functions inherited from System.SystemException
 SystemException (SerializationInfo info, StreamingContext context)
 Initializes a new instance of the T:System.SystemException class with serialized data. More...
 
- Protected Member Functions inherited from System.Exception
 Exception (SerializationInfo info, StreamingContext context)
 Initializes a new instance of the T:System.Exception class with serialized data. More...
 

Properties

override string Message [get]
 Gets the error message and the string representation of the invalid argument value, or only the error message if the argument value is null. More...
 
virtual object ActualValue [get]
 Gets the argument value that causes this exception. More...
 
- Properties inherited from System.ArgumentException
override string Message [get]
 Gets the error message and the parameter name, or only the error message if no parameter name is set. More...
 
virtual string ParamName [get]
 Gets the name of the parameter that causes this exception. More...
 
- Properties inherited from System.Exception
virtual string Message [get]
 Gets a message that describes the current exception. More...
 
virtual IDictionary Data [get]
 Gets a collection of key/value pairs that provide additional user-defined information about the exception. More...
 
Exception InnerException [get]
 Gets the T:System.Exception instance that caused the current exception. More...
 
MethodBase TargetSite [get]
 Gets the method that throws the current exception. More...
 
virtual string StackTrace [get]
 Gets a string representation of the immediate frames on the call stack. More...
 
virtual string HelpLink [get, set]
 Gets or sets a link to the help file associated with this exception. More...
 
virtual string Source [get, set]
 Gets or sets the name of the application or the object that causes the error. More...
 
int HResult [get, protected set]
 Gets or sets HRESULT, a coded numerical value that is assigned to a specific exception. More...
 
EventHandler< SafeSerializationEventArgsSerializeObjectState
 Occurs when an exception is serialized to create an exception state object that contains serialized data about the exception. More...
 
- Properties inherited from System.Runtime.InteropServices._Exception
string Message [get]
 Provides COM objects with version-independent access to the P:System.Exception.Message property. More...
 
string StackTrace [get]
 Provides COM objects with version-independent access to the P:System.Exception.StackTrace property. More...
 
string HelpLink [get, set]
 Provides COM objects with version-independent access to the P:System.Exception.HelpLink property. More...
 
string Source [get, set]
 Provides COM objects with version-independent access to the P:System.Exception.Source property. More...
 
Exception InnerException [get]
 Provides COM objects with version-independent access to the P:System.Exception.InnerException property. More...
 
MethodBase TargetSite [get]
 Provides COM objects with version-independent access to the P:System.Exception.TargetSite property. More...
 

Detailed Description

The exception that is thrown when the value of an argument is outside the allowable range of values as defined by the invoked method.

Definition at line 11 of file ArgumentOutOfRangeException.cs.

Constructor & Destructor Documentation

◆ ArgumentOutOfRangeException() [1/6]

System.ArgumentOutOfRangeException.ArgumentOutOfRangeException ( )

Initializes a new instance of the T:System.ArgumentOutOfRangeException class.

Definition at line 65 of file ArgumentOutOfRangeException.cs.

◆ ArgumentOutOfRangeException() [2/6]

System.ArgumentOutOfRangeException.ArgumentOutOfRangeException ( string  paramName)

Initializes a new instance of the T:System.ArgumentOutOfRangeException class with the name of the parameter that causes this exception.

Parameters
paramNameThe name of the parameter that causes this exception.

Definition at line 74 of file ArgumentOutOfRangeException.cs.

◆ ArgumentOutOfRangeException() [3/6]

System.ArgumentOutOfRangeException.ArgumentOutOfRangeException ( string  paramName,
string  message 
)

Initializes a new instance of the T:System.ArgumentOutOfRangeException class with the name of the parameter that causes this exception and a specified error message.

Parameters
paramNameThe name of the parameter that caused the exception.
messageThe message that describes the error.

Definition at line 84 of file ArgumentOutOfRangeException.cs.

◆ ArgumentOutOfRangeException() [4/6]

System.ArgumentOutOfRangeException.ArgumentOutOfRangeException ( string  message,
Exception  innerException 
)

Initializes a new instance of the T:System.ArgumentOutOfRangeException class with a specified error message and the exception that is the cause of this exception.

Parameters
messageThe error message that explains the reason for this exception.
innerExceptionThe exception that is the cause of the current exception, or a null reference (Nothing in Visual Basic) if no inner exception is specified.

Definition at line 94 of file ArgumentOutOfRangeException.cs.

◆ ArgumentOutOfRangeException() [5/6]

System.ArgumentOutOfRangeException.ArgumentOutOfRangeException ( string  paramName,
object  actualValue,
string  message 
)

Initializes a new instance of the T:System.ArgumentOutOfRangeException class with the parameter name, the value of the argument, and a specified error message.

Parameters
paramNameThe name of the parameter that caused the exception.
actualValueThe value of the argument that causes this exception.
messageThe message that describes the error.

Definition at line 105 of file ArgumentOutOfRangeException.cs.

◆ ArgumentOutOfRangeException() [6/6]

System.ArgumentOutOfRangeException.ArgumentOutOfRangeException ( SerializationInfo  info,
StreamingContext  context 
)
protected

Initializes a new instance of the T:System.ArgumentOutOfRangeException class with serialized data.

Parameters
infoThe object that holds the serialized object data.
contextAn object that describes the source or destination of the serialized data.

Definition at line 130 of file ArgumentOutOfRangeException.cs.

Member Function Documentation

◆ GetObjectData()

override void System.ArgumentOutOfRangeException.GetObjectData ( SerializationInfo  info,
StreamingContext  context 
)

Sets the T:System.Runtime.Serialization.SerializationInfo object with the invalid argument value and additional exception information.

Parameters
infoThe object that holds the serialized object data.
contextAn object that describes the source or destination of the serialized data.
Exceptions
T:System.ArgumentNullExceptionThe info object is null.

Implements System.Runtime.Serialization.ISerializable.

Definition at line 117 of file ArgumentOutOfRangeException.cs.

Property Documentation

◆ ActualValue

virtual object System.ArgumentOutOfRangeException.ActualValue
get

Gets the argument value that causes this exception.

Returns
An Object that contains the value of the parameter that caused the current T:System.Exception.

Definition at line 55 of file ArgumentOutOfRangeException.cs.

◆ Message

override string System.ArgumentOutOfRangeException.Message
get

Gets the error message and the string representation of the invalid argument value, or only the error message if the argument value is null.

Returns
The text message for this exception. The value of this property takes one of two forms, as follows.Condition Value The actualValue is null. The message string passed to the constructor. The actualValue is not null. The message string appended with the string representation of the invalid argument value.

Definition at line 33 of file ArgumentOutOfRangeException.cs.


The documentation for this class was generated from the following file: