UriFormatException 建構函式
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
初始化 UriFormatException 類別的新執行個體。
多載
| 名稱 | Description |
|---|---|
| UriFormatException() |
初始化 UriFormatException 類別的新執行個體。 |
| UriFormatException(String) |
初始化一個新的類別實例 UriFormatException ,並以指定訊息進行。 |
| UriFormatException(SerializationInfo, StreamingContext) |
已淘汰.
從指定的 UriFormatException 和 SerializationInfo 實例中初始化該類別的新實例StreamingContext。 |
| UriFormatException(String, Exception) |
初始化類別的新實例 UriFormatException ,並附上指定的錯誤訊息及導致該異常的內部例外的參考。 |
UriFormatException()
初始化 UriFormatException 類別的新執行個體。
public:
UriFormatException();
public UriFormatException();
Public Sub New ()
備註
無參數建構子初始化一個類別的新實例 UriFormatException ,所有欄位設為 null。
適用於
UriFormatException(String)
初始化一個新的類別實例 UriFormatException ,並以指定訊息進行。
public:
UriFormatException(System::String ^ textString);
public UriFormatException(string textString);
public UriFormatException(string? textString);
new UriFormatException : string -> UriFormatException
Public Sub New (textString As String)
參數
- textString
- String
錯誤訊息字串。
備註
UriFormatException 建構子 UriFormatException 初始化實例時,屬性 Message 設定為 的 textString值。
適用於
UriFormatException(SerializationInfo, StreamingContext)
警告
This API supports obsolete formatter-based serialization. It should not be called or extended by application code.
從指定的 UriFormatException 和 SerializationInfo 實例中初始化該類別的新實例StreamingContext。
protected:
UriFormatException(System::Runtime::Serialization::SerializationInfo ^ serializationInfo, System::Runtime::Serialization::StreamingContext streamingContext);
[System.Obsolete("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId="SYSLIB0051", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
protected UriFormatException(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext);
protected UriFormatException(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext);
[<System.Obsolete("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId="SYSLIB0051", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
new UriFormatException : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> UriFormatException
new UriFormatException : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> UriFormatException
Protected Sub New (serializationInfo As SerializationInfo, streamingContext As StreamingContext)
參數
- serializationInfo
- SerializationInfo
SerializationInfo A 包含序列化新 UriFormatException的資訊。
- streamingContext
- StreamingContext
A StreamingContext 包含與新 UriFormatException關聯的序列化串流來源。
- 屬性
備註
此建構子實 ISerializable 作該類別的 UriFormatException 介面。
另請參閱
適用於
UriFormatException(String, Exception)
初始化類別的新實例 UriFormatException ,並附上指定的錯誤訊息及導致該異常的內部例外的參考。
public:
UriFormatException(System::String ^ textString, Exception ^ e);
public UriFormatException(string textString, Exception e);
public UriFormatException(string? textString, Exception? e);
new UriFormatException : string * Exception -> UriFormatException
Public Sub New (textString As String, e As Exception)
參數
- textString
- String
描述例外的訊息。 此建構器的呼叫者必須確保此字串已在目前系統文化中本地化。
該例外即為當前例外的原因。 若 innerException 參數不 null為 ,則在處理內部異常的區塊中提出 catch 當前例外。
備註
因先前例外直接拋出的例外,應包含對該屬性中 InnerException 先前例外的參考。 該 InnerException 屬性回傳與傳入建構子相同的值,或 null 若該 InnerException 性質未提供內部例外值給建構子。
下表顯示了 的 UriFormatException初始屬性值。
| 房產 | 價值 |
|---|---|
| InnerException |
null。 |
| Message | 錯誤訊息字串在 message中指定。 |