Compartir a través de


Requires.Fail Method

Definition

Overloads

Fail(String)

Throws an ArgumentException.

Fail(String, Object[])

Throws an ArgumentException.

Fail(Exception, String, Object[])

Throws an ArgumentException.

Fail(String)

Throws an ArgumentException.

public:
 static Exception ^ Fail(System::String ^ message);
[System.Diagnostics.DebuggerStepThrough]
public static Exception Fail (string? message);
[<System.Diagnostics.DebuggerStepThrough>]
static member Fail : string -> Exception
Public Shared Function Fail (message As String) As Exception

Parameters

message
String

Returns

Nothing. It always throws.

Attributes

Applies to

Fail(String, Object[])

Throws an ArgumentException.

public:
 static Exception ^ Fail(System::String ^ unformattedMessage, ... cli::array <System::Object ^> ^ args);
[System.Diagnostics.DebuggerStepThrough]
public static Exception Fail (string unformattedMessage, params object?[] args);
[<System.Diagnostics.DebuggerStepThrough>]
static member Fail : string * obj[] -> Exception
Public Shared Function Fail (unformattedMessage As String, ParamArray args As Object()) As Exception

Parameters

unformattedMessage
String
args
Object[]

Returns

Nothing. It always throws.

Attributes

Applies to

Fail(Exception, String, Object[])

Throws an ArgumentException.

public:
 static Exception ^ Fail(Exception ^ innerException, System::String ^ unformattedMessage, ... cli::array <System::Object ^> ^ args);
[System.Diagnostics.DebuggerStepThrough]
public static Exception Fail (Exception? innerException, string unformattedMessage, params object?[] args);
[<System.Diagnostics.DebuggerStepThrough>]
static member Fail : Exception * string * obj[] -> Exception
Public Shared Function Fail (innerException As Exception, unformattedMessage As String, ParamArray args As Object()) As Exception

Parameters

innerException
Exception
unformattedMessage
String
args
Object[]

Returns

Nothing. This method always throws.

Attributes

Applies to