編集

次の方法で共有


ThrowHelper.ThrowArgumentException Method

Definition

Overloads

ThrowArgumentException()

Source:
ThrowHelper.cs
Source:
ThrowHelper.cs

Throws a new ArgumentException.

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

Exceptions

Thrown with no parameters.

Applies to

ThrowArgumentException(String)

Source:
ThrowHelper.cs
Source:
ThrowHelper.cs

Throws a new ArgumentException.

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

Parameters

message
String

The message to include in the exception.

Exceptions

Thrown with the specified parameter.

Applies to

ThrowArgumentException(String, Exception)

Source:
ThrowHelper.cs
Source:
ThrowHelper.cs

Throws a new ArgumentException.

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

Parameters

message
String

The message to include in the exception.

innerException
Exception

The inner Exception to include.

Exceptions

Thrown with the specified parameters.

Applies to

ThrowArgumentException(String, String)

Source:
ThrowHelper.cs
Source:
ThrowHelper.cs

Throws a new ArgumentException.

public static void ThrowArgumentException(string? name, string? message);
static member ThrowArgumentException : string * string -> unit
Public Shared Sub ThrowArgumentException (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

ThrowArgumentException(String, String, Exception)

Source:
ThrowHelper.cs
Source:
ThrowHelper.cs

Throws a new ArgumentException.

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

Parameters

name
String

The argument name.

message
String

The message to include in the exception.

innerException
Exception

The inner Exception to include.

Exceptions

Thrown with the specified parameters.

Applies to

ThrowArgumentException<T>(String, String)

Source:
ThrowHelper.Generic.cs
Source:
ThrowHelper.Generic.cs

Throws a new ArgumentException.

public static T ThrowArgumentException<T>(string? name, string? message);
static member ThrowArgumentException : string * string -> 'T
Public Shared Function ThrowArgumentException(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

ThrowArgumentException<T>(String, Exception)

Source:
ThrowHelper.Generic.cs
Source:
ThrowHelper.Generic.cs

Throws a new ArgumentException.

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

Type Parameters

T

The type of expected result.

Parameters

message
String

The message to include in the exception.

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 parameters.

Applies to

ThrowArgumentException<T>(String, String, Exception)

Source:
ThrowHelper.Generic.cs
Source:
ThrowHelper.Generic.cs

Throws a new ArgumentException.

public static T ThrowArgumentException<T>(string? name, string? message, Exception? innerException);
static member ThrowArgumentException : string * string * Exception -> 'T
Public Shared Function ThrowArgumentException(Of T) (name As String, message As String, innerException As Exception) 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.

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 parameters.

Applies to

ThrowArgumentException<T>()

Source:
ThrowHelper.Generic.cs
Source:
ThrowHelper.Generic.cs

Throws a new ArgumentException.

public static T ThrowArgumentException<T>();
static member ThrowArgumentException : unit -> 'T
Public Shared Function ThrowArgumentException(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

ThrowArgumentException<T>(String)

Source:
ThrowHelper.Generic.cs
Source:
ThrowHelper.Generic.cs

Throws a new ArgumentException.

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

Type Parameters

T

The type of expected result.

Parameters

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 parameter.

Applies to