ThrowHelper.ThrowArgumentException Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
| ThrowArgumentException() |
Throws a new ArgumentException. |
| ThrowArgumentException(String) |
Throws a new ArgumentException. |
| ThrowArgumentException(String, Exception) |
Throws a new ArgumentException. |
| ThrowArgumentException(String, String) |
Throws a new ArgumentException. |
| ThrowArgumentException(String, String, Exception) |
Throws a new ArgumentException. |
| ThrowArgumentException<T>(String, String) |
Throws a new ArgumentException. |
| ThrowArgumentException<T>(String, Exception) |
Throws a new ArgumentException. |
| ThrowArgumentException<T>(String, String, Exception) |
Throws a new ArgumentException. |
| ThrowArgumentException<T>() |
Throws a new ArgumentException. |
| ThrowArgumentException<T>(String) |
Throws a new ArgumentException. |
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.
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.
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
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.
Returns
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.
Returns
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
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
This method always throws, so it actually never returns a value.
Exceptions
Thrown with the specified parameter.