編集

次の方法で共有


ThrowHelper.ThrowInvalidOperationException Method

Definition

Overloads

ThrowInvalidOperationException(String)

Source:
ThrowHelper.cs
Source:
ThrowHelper.cs
public static void ThrowInvalidOperationException(string? message);
static member ThrowInvalidOperationException : string -> unit
Public Shared Sub ThrowInvalidOperationException (message As String)

Parameters

message
String

The message to include in the exception.

Exceptions

Thrown with the specified parameter.

Applies to

ThrowInvalidOperationException(String, Exception)

Source:
ThrowHelper.cs
Source:
ThrowHelper.cs
public static void ThrowInvalidOperationException(string? message, Exception? innerException);
static member ThrowInvalidOperationException : string * Exception -> unit
Public Shared Sub ThrowInvalidOperationException (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 parameter.

Applies to

ThrowInvalidOperationException()

Source:
ThrowHelper.cs
Source:
ThrowHelper.cs
public static void ThrowInvalidOperationException();
static member ThrowInvalidOperationException : unit -> unit
Public Shared Sub ThrowInvalidOperationException ()

Exceptions

Thrown with no parameters.

Applies to

ThrowInvalidOperationException<T>()

Source:
ThrowHelper.Generic.cs
Source:
ThrowHelper.Generic.cs
public static T ThrowInvalidOperationException<T>();
static member ThrowInvalidOperationException : unit -> 'T
Public Shared Function ThrowInvalidOperationException(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

ThrowInvalidOperationException<T>(String)

Source:
ThrowHelper.Generic.cs
Source:
ThrowHelper.Generic.cs
public static T ThrowInvalidOperationException<T>(string? message);
static member ThrowInvalidOperationException : string -> 'T
Public Shared Function ThrowInvalidOperationException(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

ThrowInvalidOperationException<T>(String, Exception)

Source:
ThrowHelper.Generic.cs
Source:
ThrowHelper.Generic.cs
public static T ThrowInvalidOperationException<T>(string? message, Exception? innerException);
static member ThrowInvalidOperationException : string * Exception -> 'T
Public Shared Function ThrowInvalidOperationException(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 parameter.

Applies to