CommandException 构造函数

定义

重载

CommandException()

初始化 CommandException 类的新实例。

CommandException(String)

CommandException使用提供的消息初始化类的新实例。

CommandException(SerializationInfo, StreamingContext)

CommandException使用提供的信息和上下文初始化类的新实例。

CommandException(String, Exception)

CommandException使用提供的消息和内部异常初始化类的新实例。

CommandException()

初始化 CommandException 类的新实例。

public:
 CommandException();
public CommandException ();
Public Sub New ()

适用于

CommandException(String)

CommandException使用提供的消息初始化类的新实例。

public:
 CommandException(System::String ^ msg);
public CommandException (string msg);
new Microsoft.VisualStudio.TestTools.Exceptions.CommandException : string -> Microsoft.VisualStudio.TestTools.Exceptions.CommandException
Public Sub New (msg As String)

参数

msg
String

描述异常的消息。

适用于

CommandException(SerializationInfo, StreamingContext)

CommandException使用提供的信息和上下文初始化类的新实例。

protected:
 CommandException(System::Runtime::Serialization::SerializationInfo ^ info, System::Runtime::Serialization::StreamingContext context);
protected CommandException (System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context);
new Microsoft.VisualStudio.TestTools.Exceptions.CommandException : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> Microsoft.VisualStudio.TestTools.Exceptions.CommandException
Protected Sub New (info As SerializationInfo, context As StreamingContext)

参数

info
SerializationInfo

有关异常的信息。

context
StreamingContext

异常的源和目标。

适用于

CommandException(String, Exception)

CommandException使用提供的消息和内部异常初始化类的新实例。

public:
 CommandException(System::String ^ msg, Exception ^ inner);
public CommandException (string msg, Exception inner);
new Microsoft.VisualStudio.TestTools.Exceptions.CommandException : string * Exception -> Microsoft.VisualStudio.TestTools.Exceptions.CommandException
Public Sub New (msg As String, inner As Exception)

参数

msg
String

描述异常的消息。

inner
Exception

导致当前异常的异常。

适用于