XPathException 建構函式
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
初始化 XPathException 類別的新執行個體。
多載
XPathException() |
初始化 XPathException 類別的新執行個體。 |
XPathException(String) |
使用指定的例外狀況訊息,初始化 XPathException 類別的新執行個體。 |
XPathException(SerializationInfo, StreamingContext) |
已淘汰.
使用 SerializationInfo 和 StreamingContext 物件中的訊息,初始化 XPathException 類別的新執行個體。 |
XPathException(String, Exception) |
使用指定的例外狀況訊息和 XPathException 物件,初始化 Exception 類別的新執行個體。 |
XPathException()
初始化 XPathException 類別的新執行個體。
public:
XPathException();
public XPathException ();
Public Sub New ()
適用於
XPathException(String)
使用指定的例外狀況訊息,初始化 XPathException 類別的新執行個體。
public:
XPathException(System::String ^ message);
public XPathException (string? message);
public XPathException (string message);
new System.Xml.XPath.XPathException : string -> System.Xml.XPath.XPathException
Public Sub New (message As String)
參數
- message
- String
錯誤條件的描述。
適用於
XPathException(SerializationInfo, StreamingContext)
警告
This API supports obsolete formatter-based serialization. It should not be called or extended by application code.
使用 SerializationInfo 和 StreamingContext 物件中的訊息,初始化 XPathException 類別的新執行個體。
protected:
XPathException(System::Runtime::Serialization::SerializationInfo ^ info, System::Runtime::Serialization::StreamingContext context);
protected XPathException (System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context);
[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 XPathException (System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context);
new System.Xml.XPath.XPathException : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> System.Xml.XPath.XPathException
[<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 System.Xml.XPath.XPathException : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> System.Xml.XPath.XPathException
Protected Sub New (info As SerializationInfo, context As StreamingContext)
參數
- info
- SerializationInfo
SerializationInfo 物件,包含 XPathException 的所有屬性。
- context
- StreamingContext
StreamingContext 物件。
- 屬性
適用於
XPathException(String, Exception)
使用指定的例外狀況訊息和 XPathException 物件,初始化 Exception 類別的新執行個體。
public:
XPathException(System::String ^ message, Exception ^ innerException);
public XPathException (string? message, Exception? innerException);
public XPathException (string message, Exception innerException);
new System.Xml.XPath.XPathException : string * Exception -> System.Xml.XPath.XPathException
Public Sub New (message As String, innerException As Exception)
參數
- message
- String
錯誤條件的描述。
- innerException
- Exception
擲回 Exception 的 XPathException (如果有的話)。 這個值可以是 null
。