EndpointNotFoundException 建構函式

定義

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

多載

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 參考 (在 Visual Basic 中為 InnerException)。

適用於