語言

EndpointNotFoundException 建構函式

定義

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

多載

名稱 Description
EndpointNotFoundException()

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

EndpointNotFoundException(String)

使用指定的錯誤訊息,初始化 EndpointNotFoundException 類別的新實例。

EndpointNotFoundException(SerializationInfo, StreamingContext)

初始化該類別的新實例 EndpointNotFoundException ,並以指定串流的來源與目的地資料,以及序列化例外所需的資訊。

EndpointNotFoundException(String, Exception)

初始化類別的新實例 EndpointNotFoundException ,並附上指定的錯誤訊息及導致當前例外的內部例外。

備註

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

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

如果您要傳遞串行化資訊和串流內容,請使用 EndpointNotFoundException(SerializationInfo, StreamingContext) 建構函式。

EndpointNotFoundException()

來源:
EndpointNotFoundException.cs
來源:
EndpointNotFoundException.cs
來源:
EndpointNotFoundException.cs

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

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

適用於

EndpointNotFoundException(String)

來源:
EndpointNotFoundException.cs
來源:
EndpointNotFoundException.cs
來源:
EndpointNotFoundException.cs

使用指定的錯誤訊息,初始化 EndpointNotFoundException 類別的新實例。

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

參數

message
String

說明例外狀況原因的錯誤訊息。

備註

當您想要將錯誤訊息傳遞給使用者時,請使用此建構函式。 訊息參數的內容應該對預定的用戶瞭解。

適用於

EndpointNotFoundException(SerializationInfo, StreamingContext)

來源:
EndpointNotFoundException.cs
來源:
EndpointNotFoundException.cs
來源:
EndpointNotFoundException.cs

初始化該類別的新實例 EndpointNotFoundException ,並以指定串流的來源與目的地資料,以及序列化例外所需的資訊。

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

參數

info
SerializationInfo

SerializationInfo,其中包含串行化例外狀況所需的所有數據。

context
StreamingContext

指定數據流來源和目的地的 StreamingContext。

備註

還原串行化期間會呼叫這個建構函式,以重新建構透過數據流傳輸的例外狀況物件。

適用於

EndpointNotFoundException(String, Exception)

來源:
EndpointNotFoundException.cs
來源:
EndpointNotFoundException.cs
來源:
EndpointNotFoundException.cs

初始化類別的新實例 EndpointNotFoundException ,並附上指定的錯誤訊息及導致當前例外的內部例外。

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

參數

message
String

說明例外狀況原因的錯誤訊息。

innerException
Exception

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

備註

當你想將錯誤訊息和內部例外的資訊傳達給使用者時,可以使用這個建構器。 訊息參數的內容應該對預定的用戶瞭解。

以先前例外狀況的直接結果擲回的例外狀況,可以在 InnerException 屬性中包含上一個例外狀況的參考。 該InnerException屬性會回傳與傳入建構子相同的值,或如果該null屬性未提供內部例外值,則會回Nothing傳一個參考InnerException(在 Visual Basic)。

適用於