PlatformNotSupportedExceptionExtensions Class

Provides ThrowNew extension methods for PlatformNotSupportedException.

public static class PlatformNotSupportedExceptionExtensions

Remarks

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

NameDescription
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()

extension(PlatformNotSupportedException)
{
    public static void ThrowNew()
}

PlatformNotSupportedException.ThrowNew(string?)

extension(PlatformNotSupportedException)
{
    public static void ThrowNew(string? message)
}
Parameters
message string?
The text message that explains the reason for the exception.

PlatformNotSupportedException.ThrowNew(string?, Exception?)

extension(PlatformNotSupportedException)
{
    public static void ThrowNew(string? message, Exception? inner)
}
Parameters
message string?
The error message that explains the reason for the exception.
inner Exception?
The exception that is the cause of the current exception. If the inner parameter is not null, the current exception is raised in a catch block 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
message string?
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
message string?
The error message that explains the reason for the exception.
inner Exception?
The exception that is the cause of the current exception. If the inner parameter is not null, the current exception is raised in a catch block that handles the inner exception.
Returns

T This method does not return.