UriFormatException 构造函数
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
初始化 UriFormatException 类的新实例。
重载
| 名称 | 说明 |
|---|---|
| UriFormatException() |
初始化 UriFormatException 类的新实例。 |
| UriFormatException(String) |
使用指定的消息初始化类的新实例 UriFormatException 。 |
| UriFormatException(SerializationInfo, StreamingContext) |
已过时.
从指定UriFormatException实例和SerializationInfo实例初始化类的新实例StreamingContext。 |
| UriFormatException(String, Exception) |
使用指定的错误消息和对作为此异常原因的内部异常的引用初始化类的新实例 UriFormatException 。 |
UriFormatException()
- Source:
- UriFormatException.cs
- Source:
- UriFormatException.cs
- Source:
- UriFormatException.cs
- Source:
- UriFormatException.cs
- Source:
- UriFormatException.cs
初始化 UriFormatException 类的新实例。
public:
UriFormatException();
public UriFormatException();
Public Sub New ()
注解
无参数构造函数初始化类的新实例 UriFormatException ,并将所有字段都设置为 null。
适用于
UriFormatException(String)
- Source:
- UriFormatException.cs
- Source:
- UriFormatException.cs
- Source:
- UriFormatException.cs
- Source:
- UriFormatException.cs
- Source:
- UriFormatException.cs
使用指定的消息初始化类的新实例 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设置为值textString的属性初始化实例Message。
适用于
UriFormatException(SerializationInfo, StreamingContext)
- Source:
- UriFormatException.cs
- Source:
- UriFormatException.cs
- Source:
- UriFormatException.cs
- Source:
- UriFormatException.cs
- Source:
- UriFormatException.cs
注意
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 包含序列化新 UriFormatException项所需的信息。
- streamingContext
- StreamingContext
一个 StreamingContext 包含与新 UriFormatException流关联的序列化流的源。
- 属性
注解
此构造函数实现 ISerializable 类的 UriFormatException 接口。
另请参阅
适用于
UriFormatException(String, Exception)
- Source:
- UriFormatException.cs
- Source:
- UriFormatException.cs
- Source:
- UriFormatException.cs
- Source:
- UriFormatException.cs
- Source:
- UriFormatException.cs
使用指定的错误消息和对作为此异常原因的内部异常的引用初始化类的新实例 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
描述异常的消息。 此构造函数的调用方必须确保此字符串已本地化为当前系统区域性。
是当前异常原因的异常。 如果未 innerExceptionnull 参数,则会在处理内部异常的 catch 块中引发当前异常。
注解
作为上一个异常的直接结果引发的异常应包括对 InnerException 属性中上一个异常的引用。
InnerException 属性返回传入构造函数的相同值,或者如果 null 属性未向构造函数提供内部异常值,则返回 InnerException。
下表显示了 UriFormatException实例的初始属性值。
| 财产 | 价值 |
|---|---|
| InnerException |
null。 |
| Message |
message中指定的错误消息字符串。 |