ThrowHelper.ThrowArgumentOutOfRangeException Method

Definition

Overloads

ThrowArgumentOutOfRangeException(String, Object, String)

Throws a new ArgumentOutOfRangeException.

ThrowArgumentOutOfRangeException(String, String)

Throws a new ArgumentOutOfRangeException.

ThrowArgumentOutOfRangeException(String)

Throws a new ArgumentOutOfRangeException.

ThrowArgumentOutOfRangeException()

Throws a new ArgumentOutOfRangeException.

ThrowArgumentOutOfRangeException(String, Exception)

Throws a new ArgumentOutOfRangeException.

ThrowArgumentOutOfRangeException<T>()

Throws a new ArgumentOutOfRangeException.

ThrowArgumentOutOfRangeException<T>(String)

Throws a new ArgumentOutOfRangeException.

ThrowArgumentOutOfRangeException<T>(String, Exception)

Throws a new ArgumentOutOfRangeException.

ThrowArgumentOutOfRangeException<T>(String, String)

Throws a new ArgumentOutOfRangeException.

ThrowArgumentOutOfRangeException<T>(String, Object, String)

Throws a new ArgumentOutOfRangeException.

ThrowArgumentOutOfRangeException(String, Object, String)

public static void ThrowArgumentOutOfRangeException (string? name, object? value, string? message);
static member ThrowArgumentOutOfRangeException : string * obj * string -> unit
Public Shared Sub ThrowArgumentOutOfRangeException (name As String, value As Object, message As String)

Parameters

name
String

The argument name.

value
Object

The current argument value.

message
String

The message to include in the exception.

Exceptions

Thrown with the specified parameters.

Applies to

ThrowArgumentOutOfRangeException(String, String)

public static void ThrowArgumentOutOfRangeException (string? name, string? message);
static member ThrowArgumentOutOfRangeException : string * string -> unit
Public Shared Sub ThrowArgumentOutOfRangeException (name As String, message As String)

Parameters

name
String

The argument name.

message
String

The message to include in the exception.

Exceptions

Thrown with the specified parameters.

Applies to

ThrowArgumentOutOfRangeException(String)

public static void ThrowArgumentOutOfRangeException (string? name);
static member ThrowArgumentOutOfRangeException : string -> unit
Public Shared Sub ThrowArgumentOutOfRangeException (name As String)

Parameters

name
String

The argument name.

Exceptions

Thrown with the specified parameter.

Applies to

ThrowArgumentOutOfRangeException()

public static void ThrowArgumentOutOfRangeException ();
static member ThrowArgumentOutOfRangeException : unit -> unit
Public Shared Sub ThrowArgumentOutOfRangeException ()

Exceptions

Thrown with no parameters.

Applies to

ThrowArgumentOutOfRangeException(String, Exception)

public static void ThrowArgumentOutOfRangeException (string? name, Exception? innerException);
static member ThrowArgumentOutOfRangeException : string * Exception -> unit
Public Shared Sub ThrowArgumentOutOfRangeException (name As String, innerException As Exception)

Parameters

name
String

The argument name.

innerException
Exception

The inner Exception to include.

Exceptions

Thrown with the specified parameter.

Applies to

ThrowArgumentOutOfRangeException<T>()

public static T ThrowArgumentOutOfRangeException<T> ();
static member ThrowArgumentOutOfRangeException : unit -> 'T
Public Shared Function ThrowArgumentOutOfRangeException(Of T) () As T

Type Parameters

T

The type of expected result.

Returns

T

This method always throws, so it actually never returns a value.

Exceptions

Thrown with no parameters.

Applies to

ThrowArgumentOutOfRangeException<T>(String)

public static T ThrowArgumentOutOfRangeException<T> (string? name);
static member ThrowArgumentOutOfRangeException : string -> 'T
Public Shared Function ThrowArgumentOutOfRangeException(Of T) (name As String) As T

Type Parameters

T

The type of expected result.

Parameters

name
String

The argument name.

Returns

T

This method always throws, so it actually never returns a value.

Exceptions

Thrown with the specified parameter.

Applies to

ThrowArgumentOutOfRangeException<T>(String, Exception)

public static T ThrowArgumentOutOfRangeException<T> (string? name, Exception? innerException);
static member ThrowArgumentOutOfRangeException : string * Exception -> 'T
Public Shared Function ThrowArgumentOutOfRangeException(Of T) (name As String, innerException As Exception) As T

Type Parameters

T

The type of expected result.

Parameters

name
String

The argument name.

innerException
Exception

The inner Exception to include.

Returns

T

This method always throws, so it actually never returns a value.

Exceptions

Thrown with the specified parameter.

Applies to

ThrowArgumentOutOfRangeException<T>(String, String)

public static T ThrowArgumentOutOfRangeException<T> (string? name, string? message);
static member ThrowArgumentOutOfRangeException : string * string -> 'T
Public Shared Function ThrowArgumentOutOfRangeException(Of T) (name As String, message As String) As T

Type Parameters

T

The type of expected result.

Parameters

name
String

The argument name.

message
String

The message to include in the exception.

Returns

T

This method always throws, so it actually never returns a value.

Exceptions

Thrown with the specified parameters.

Applies to

ThrowArgumentOutOfRangeException<T>(String, Object, String)

public static T ThrowArgumentOutOfRangeException<T> (string? name, object? value, string? message);
static member ThrowArgumentOutOfRangeException : string * obj * string -> 'T
Public Shared Function ThrowArgumentOutOfRangeException(Of T) (name As String, value As Object, message As String) As T

Type Parameters

T

The type of expected result.

Parameters

name
String

The argument name.

value
Object

The current argument value.

message
String

The message to include in the exception.

Returns

T

This method always throws, so it actually never returns a value.

Exceptions

Thrown with the specified parameters.

Applies to