UriFormatException 构造函数  
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
初始化 UriFormatException 类的新实例。
重载
| UriFormatException() | 
						 初始化 UriFormatException 类的新实例。  | 
        	
| UriFormatException(String) | 
						 使用指定的消息初始化 UriFormatException 类的新实例。  | 
        	
| UriFormatException(SerializationInfo, StreamingContext) | 
							 
		已过时.
	 
根据指定的 SerializationInfo 和 StreamingContext 实例初始化 UriFormatException 类的新实例。  | 
        	
| UriFormatException(String, Exception) | 
						 使用指定的错误消息和对作为此异常原因的内部异常的引用来初始化 UriFormatException 类的新实例。  | 
        	
UriFormatException()
- 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
 
使用指定的消息初始化 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)
- 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.
根据指定的 SerializationInfo 和 StreamingContext 实例初始化 UriFormatException 类的新实例。
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}")]
protected UriFormatException (System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext);
	new UriFormatException : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> UriFormatException
	[<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
	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
 
使用指定的错误消息和对作为此异常原因的内部异常的引用来初始化 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 属性将返回传递给构造函数的同一值;如果 InnerException 属性不向构造函数提供内部异常值,则返回 null。
下表显示了 UriFormatException 实例的初始属性值。
| properties | 值 | 
|---|---|
| InnerException | 
              null. | 
| Message | 
              message 中指定的错误消息字符串。 |