Requires.Fail 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
| Fail(String) |
引发 ArgumentException。 |
| Fail(String, Object[]) |
引发 ArgumentException。 |
| Fail(Exception, String, Object[]) |
引发 ArgumentException。 |
Fail(String)
引发 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
参数
- message
- String
返回
无变化。 它总是引发。
- 属性
适用于
Fail(String, Object[])
引发 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
参数
- unformattedMessage
- String
- args
- Object[]
返回
无变化。 它总是引发。
- 属性
适用于
Fail(Exception, String, Object[])
引发 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
参数
- innerException
- Exception
- unformattedMessage
- String
- args
- Object[]
返回
无变化。 此方法始终引发。
- 属性