PlatformNotSupportedExceptionExtensions Class
Provides ThrowNew extension methods for PlatformNotSupportedException.
public static class PlatformNotSupportedExceptionExtensionsRemarks
Each public constructor of the exception type has two methods, with the parameters of the constructor. Call them on the exception type, as in PlatformNotSupportedException.ThrowNew(message).
The first method returns no value. Call it as a statement.
The second method has a type parameter, which is also its return type. Call it where the code needs an expression of that type.
See also
Methods
| Name | Description |
|---|---|
| PlatformNotSupportedException.ThrowNew() | Throws a new PlatformNotSupportedException. |
| PlatformNotSupportedException.ThrowNew(string?) | Throws a new PlatformNotSupportedException. |
| PlatformNotSupportedException.ThrowNew(string?, Exception?) | Throws a new PlatformNotSupportedException. |
| PlatformNotSupportedException.ThrowNew<T>() | Throws a new PlatformNotSupportedException, where the code needs an expression of type T. |
| PlatformNotSupportedException.ThrowNew<T>(string?) | Throws a new PlatformNotSupportedException, where the code needs an expression of type T. |
| PlatformNotSupportedException.ThrowNew<T>(string?, Exception?) | Throws a new PlatformNotSupportedException, where the code needs an expression of type T. |
PlatformNotSupportedException.ThrowNew overloads
PlatformNotSupportedException.ThrowNew()
Throws a new PlatformNotSupportedException.
extension(PlatformNotSupportedException)
{
public static void ThrowNew()
}PlatformNotSupportedException.ThrowNew(string?)
Throws a new PlatformNotSupportedException.
extension(PlatformNotSupportedException)
{
public static void ThrowNew(string? message)
}Parameters
messagestring?- The text message that explains the reason for the exception.
PlatformNotSupportedException.ThrowNew(string?, Exception?)
Throws a new PlatformNotSupportedException.
extension(PlatformNotSupportedException)
{
public static void ThrowNew(string? message, Exception? inner)
}Parameters
messagestring?- The error message that explains the reason for the exception.
innerException?- The exception that is the cause of the current exception. If the
innerparameter is notnull, the current exception is raised in acatchblock that handles the inner exception.
PlatformNotSupportedException.ThrowNew<T>()
Throws a new PlatformNotSupportedException, where the code needs an expression of type T.
extension(PlatformNotSupportedException)
{
public static T ThrowNew<T>()
}Type parameters
T- The type of the expression.
Returns
T This method does not return.
PlatformNotSupportedException.ThrowNew<T>(string?)
Throws a new PlatformNotSupportedException, where the code needs an expression of type T.
extension(PlatformNotSupportedException)
{
public static T ThrowNew<T>(string? message)
}Type parameters
T- The type of the expression.
Parameters
messagestring?- The text message that explains the reason for the exception.
Returns
T This method does not return.
PlatformNotSupportedException.ThrowNew<T>(string?, Exception?)
Throws a new PlatformNotSupportedException, where the code needs an expression of type T.
extension(PlatformNotSupportedException)
{
public static T ThrowNew<T>(string? message, Exception? inner)
}Type parameters
T- The type of the expression.
Parameters
messagestring?- The error message that explains the reason for the exception.
innerException?- The exception that is the cause of the current exception. If the
innerparameter is notnull, the current exception is raised in acatchblock that handles the inner exception.
Returns
T This method does not return.