ThrowHelper.ThrowFormatException 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
ThrowFormatException(String, Exception) |
Throws a new FormatException. |
ThrowFormatException() |
Throws a new FormatException. |
ThrowFormatException(String) |
Throws a new FormatException. |
ThrowFormatException<T>() |
Throws a new FormatException. |
ThrowFormatException<T>(String) |
Throws a new FormatException. |
ThrowFormatException<T>(String, Exception) |
Throws a new FormatException. |
ThrowFormatException(String, Exception)
Throws a new FormatException.
public static void ThrowFormatException (string? message, Exception? innerException);
static member ThrowFormatException : string * Exception -> unit
Public Shared Sub ThrowFormatException (message As String, innerException As Exception)
Parameters
- message
- String
The message to include in the exception.
Exceptions
Thrown with the specified parameter.
Applies to
ThrowFormatException()
Throws a new FormatException.
public static void ThrowFormatException ();
static member ThrowFormatException : unit -> unit
Public Shared Sub ThrowFormatException ()
Exceptions
Thrown with no parameters.
Applies to
ThrowFormatException(String)
Throws a new FormatException.
public static void ThrowFormatException (string? message);
static member ThrowFormatException : string -> unit
Public Shared Sub ThrowFormatException (message As String)
Parameters
- message
- String
The message to include in the exception.
Exceptions
Thrown with the specified parameter.
Applies to
ThrowFormatException<T>()
Throws a new FormatException.
public static T ThrowFormatException<T> ();
static member ThrowFormatException : unit -> 'T
Public Shared Function ThrowFormatException(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
ThrowFormatException<T>(String)
Throws a new FormatException.
public static T ThrowFormatException<T> (string? message);
static member ThrowFormatException : string -> 'T
Public Shared Function ThrowFormatException(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.
Applies to
ThrowFormatException<T>(String, Exception)
Throws a new FormatException.
public static T ThrowFormatException<T> (string? message, Exception? innerException);
static member ThrowFormatException : string * Exception -> 'T
Public Shared Function ThrowFormatException(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 parameter.