AddressAccessDeniedException AddressAccessDeniedException AddressAccessDeniedException AddressAccessDeniedException Constructors

定义

重载

AddressAccessDeniedException() AddressAccessDeniedException() AddressAccessDeniedException()

初始化 AddressAccessDeniedException 类的新实例。Initializes a new instance of the AddressAccessDeniedException class.

AddressAccessDeniedException(String) AddressAccessDeniedException(String) AddressAccessDeniedException(String) AddressAccessDeniedException(String)

用指定的错误消息初始化 AddressAccessDeniedException 类的新实例。Initializes a new instance of the AddressAccessDeniedException class with a specified error message.

AddressAccessDeniedException(SerializationInfo, StreamingContext) AddressAccessDeniedException(SerializationInfo, StreamingContext) AddressAccessDeniedException(SerializationInfo, StreamingContext) AddressAccessDeniedException(SerializationInfo, StreamingContext)

使用指定的序列化信息和流上下文初始化 AddressAccessDeniedException 类的新实例。Initializes a new instance of the AddressAccessDeniedException class with serialization information and streaming context specified.

AddressAccessDeniedException(String, Exception) AddressAccessDeniedException(String, Exception) AddressAccessDeniedException(String, Exception) AddressAccessDeniedException(String, Exception)

使用指定的错误消息和内部异常(导致此异常的原因)的引用来初始化 AddressAccessDeniedException 类的新实例。Initializes a new instance of the AddressAccessDeniedException class with a specified error message and a reference to the inner exception that is the cause of the exception.

注解

如果要将错误消息传递给用户,请使用 AddressAccessDeniedException(String) 构造函数。If you want to pass an error message to the user, use the AddressAccessDeniedException(String) constructor.

如果要将错误消息和内部异常(导致此异常的原因)的引用传递给用户,请使用 AddressAccessDeniedException(String, Exception) 构造函数。If you want to pass an error message and a reference to the inner exception that is the cause of the exception to the user, use the AddressAccessDeniedException(String, Exception) constructor.

如果要传递序列化信息和流上下文,请使用 AddressAccessDeniedException(SerializationInfo, StreamingContext) 构造函数。If you want to pass serialization information and streaming context, use the AddressAccessDeniedException(SerializationInfo, StreamingContext) constructor.

AddressAccessDeniedException() AddressAccessDeniedException() AddressAccessDeniedException()

初始化 AddressAccessDeniedException 类的新实例。Initializes a new instance of the AddressAccessDeniedException class.

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

AddressAccessDeniedException(String) AddressAccessDeniedException(String) AddressAccessDeniedException(String) AddressAccessDeniedException(String)

用指定的错误消息初始化 AddressAccessDeniedException 类的新实例。Initializes a new instance of the AddressAccessDeniedException class with a specified error message.

public:
 AddressAccessDeniedException(System::String ^ message);
public AddressAccessDeniedException (string message);
new System.ServiceModel.AddressAccessDeniedException : string -> System.ServiceModel.AddressAccessDeniedException
Public Sub New (message As String)

参数

message
String String String String

解释异常原因的错误消息。The error message that explains the reason for the exception.

注解

当您要将错误消息传递给用户时,请使用此构造函数。Use this constructor when you want to pass an error message to the user. 消息参数的内容应该是用户可以理解的。The content of the message parameter should be understandable to the user. 此构造函数的调用方需要确保此字符串是预期用户可以理解的。The caller of this constructor is required to ensure that this string is understandable to the intended users.

如果您还要将内部异常(导致此异常的原因)的引用以及指定的错误消息传递给用户,请使用 AddressAccessDeniedException(String, Exception) 构造函数。If you also want to pass a reference to the inner exception that is the cause of the exception as well as a specified error message to the user, use the AddressAccessDeniedException(String, Exception) constructor.

AddressAccessDeniedException(SerializationInfo, StreamingContext) AddressAccessDeniedException(SerializationInfo, StreamingContext) AddressAccessDeniedException(SerializationInfo, StreamingContext) AddressAccessDeniedException(SerializationInfo, StreamingContext)

使用指定的序列化信息和流上下文初始化 AddressAccessDeniedException 类的新实例。Initializes a new instance of the AddressAccessDeniedException class with serialization information and streaming context specified.

protected:
 AddressAccessDeniedException(System::Runtime::Serialization::SerializationInfo ^ info, System::Runtime::Serialization::StreamingContext context);
protected AddressAccessDeniedException (System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context);
new System.ServiceModel.AddressAccessDeniedException : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> System.ServiceModel.AddressAccessDeniedException
Protected Sub New (info As SerializationInfo, context As StreamingContext)

参数

info
SerializationInfo SerializationInfo SerializationInfo SerializationInfo

包含序列化异常所需的所有数据的 SerializationInfoThe SerializationInfo that contains all the data required to serialize the exception.

context
StreamingContext StreamingContext StreamingContext StreamingContext

指定流的源和目标的 StreamingContextThe StreamingContext that specifies the source and destination of the stream.

注解

在反序列化过程中调用此构造函数以重新构造通过流传输的异常对象。This constructor is called during deserialization to reconstruct the exception object transmitted over a stream.

AddressAccessDeniedException(String, Exception) AddressAccessDeniedException(String, Exception) AddressAccessDeniedException(String, Exception) AddressAccessDeniedException(String, Exception)

使用指定的错误消息和内部异常(导致此异常的原因)的引用来初始化 AddressAccessDeniedException 类的新实例。Initializes a new instance of the AddressAccessDeniedException class with a specified error message and a reference to the inner exception that is the cause of the exception.

public:
 AddressAccessDeniedException(System::String ^ message, Exception ^ innerException);
public AddressAccessDeniedException (string message, Exception innerException);
new System.ServiceModel.AddressAccessDeniedException : string * Exception -> System.ServiceModel.AddressAccessDeniedException
Public Sub New (message As String, innerException As Exception)

参数

message
String String String String

解释异常原因的错误消息。The error message that explains the reason for the exception.

innerException
Exception Exception Exception Exception

导致引发当前异常的 ExceptionThe Exception that caused the current exception to be thrown.

注解

当您要将错误消息和有关内部异常的信息传递给用户时,请使用此构造函数。Use this constructor when you want to pass an error message and information about an inner exception to the user. 消息参数的内容应该是预期用户可以理解的。The content of the message parameter should be understandable to the intended users.

因前一个异常而直接引发的异常可以在 InnerException 属性中包含对前一个异常的引用。An exception that is thrown as a direct result of a previous exception can include a reference to the previous exception in the InnerException property. InnerException 属性返回传递到构造函数中的相同值,或者如果 null 属性没有向构造函数提供内部异常值,则返回 Nothing 引用(在 Visual Basic 中为 InnerException)。The InnerException property returns the same value that is passed into the constructor, or a null reference (Nothing in Visual Basic) if the InnerException property does not supply the inner exception value to the constructor.

适用于