AddressAlreadyInUseException 建構函式

定義

初始化 AddressAlreadyInUseException 類別的新執行個體。

多載

AddressAlreadyInUseException()

初始化 AddressAlreadyInUseException 類別的新執行個體。

AddressAlreadyInUseException(String)

使用指定的錯誤訊息,初始化 AddressAlreadyInUseException 類別的新執行個體。

AddressAlreadyInUseException(SerializationInfo, StreamingContext)

使用指定的序列化 (Serialization) 資訊與資料流 (Streaming) 內容,初始化 AddressAlreadyInUseException 類別的新執行個體。

AddressAlreadyInUseException(String, Exception)

使用指定的錯誤訊息和造成此例外狀況原因的內部例外狀況參考,初始化 AddressAlreadyInUseException 類別的新執行個體。

備註

如果您要將錯誤訊息傳遞給使用者,請使用 AddressAlreadyInUseException(String) 建構函式。

如果您要將錯誤訊息與造成例外狀況的內部例外狀況參考傳遞給使用者,請使用 AddressAlreadyInUseException(String, Exception) 建構函式。

如果您要傳遞序列化資訊和資料流內容,請使用 AddressAlreadyInUseException(SerializationInfo, StreamingContext) 建構函式。

AddressAlreadyInUseException()

初始化 AddressAlreadyInUseException 類別的新執行個體。

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

適用於

AddressAlreadyInUseException(String)

使用指定的錯誤訊息,初始化 AddressAlreadyInUseException 類別的新執行個體。

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

參數

message
String

解釋例外狀況原因的錯誤訊息。

備註

當您想要傳遞錯誤訊息給使用者時,可以使用此建構函式。 訊息參數的內容應該要能夠讓目標使用者了解。

適用於

AddressAlreadyInUseException(SerializationInfo, StreamingContext)

使用指定的序列化 (Serialization) 資訊與資料流 (Streaming) 內容,初始化 AddressAlreadyInUseException 類別的新執行個體。

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

參數

info
SerializationInfo

SerializationInfo,其中包含序列化例外狀況時所需要的所有資料。

context
StreamingContext

StreamingContext,指定資料流的來源和目的地。

備註

在還原序列化期間呼叫這個建構函式,以重建在資料流上傳輸的例外狀況物件。

適用於

AddressAlreadyInUseException(String, Exception)

使用指定的錯誤訊息和造成此例外狀況原因的內部例外狀況參考,初始化 AddressAlreadyInUseException 類別的新執行個體。

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

參數

message
String

解釋例外狀況原因的錯誤訊息。

innerException
Exception

導致擲回目前例外狀況的 Exception

備註

當您想要傳遞錯誤訊息和有關內部例外狀況的資訊給使用者時,請使用此建構函式。 訊息參數的內容應該要能夠讓目標使用者了解。

直接因為前一個例外狀況而擲回的例外狀況可能包含對 InnerException 屬性中前一個例外狀況的參考。 InnerException 屬性會傳回與傳遞到建構函式中相同的值,如果 null 屬性沒有將內部例外狀況值提供給建構函式,則會傳回 Nothing 參考 (在 Visual Basic 中為 InnerException)。

適用於