RegexMatchTimeoutException 建構函式

定義

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

多載

RegexMatchTimeoutException()

使用系統提供的錯誤,初始化 RegexMatchTimeoutException 類別的新執行個體。

RegexMatchTimeoutException(String)

使用指定的訊息字串,初始化 RegexMatchTimeoutException 類別的新執行個體。

RegexMatchTimeoutException(SerializationInfo, StreamingContext)
已淘汰.

使用序列化資料,初始化 RegexMatchTimeoutException 類別的新執行個體。

RegexMatchTimeoutException(String, Exception)

使用指定的錯誤訊息以及造成此例外狀況的內部例外狀況的參考,初始化 RegexMatchTimeoutException 類別的新執行個體。

RegexMatchTimeoutException(String, String, TimeSpan)

使用規則運算式模式、輸入文字,以及逾時間隔的相關資訊,初始化 RegexMatchTimeoutException 類別的新執行個體。

RegexMatchTimeoutException()

Source:
RegexMatchTimeoutException.cs
Source:
RegexMatchTimeoutException.cs
Source:
RegexMatchTimeoutException.cs

使用系統提供的錯誤,初始化 RegexMatchTimeoutException 類別的新執行個體。

public:
 RegexMatchTimeoutException();
public RegexMatchTimeoutException ();
Public Sub New ()

備註

這是 類別的 RegexMatchTimeoutException 無參數建構函式。 這個建構函式 (Constructor) 會將新執行個體的 Message 屬性初始化為系統提供用來描述錯誤的訊息。 此訊息已針對目前的系統文化特性進行當地語系化。

適用於

RegexMatchTimeoutException(String)

Source:
RegexMatchTimeoutException.cs
Source:
RegexMatchTimeoutException.cs
Source:
RegexMatchTimeoutException.cs

使用指定的訊息字串,初始化 RegexMatchTimeoutException 類別的新執行個體。

public:
 RegexMatchTimeoutException(System::String ^ message);
public RegexMatchTimeoutException (string message);
new System.Text.RegularExpressions.RegexMatchTimeoutException : string -> System.Text.RegularExpressions.RegexMatchTimeoutException
Public Sub New (message As String)

參數

message
String

描述例外狀況的字串。

備註

字串 message 會指派給 Exception.Message 屬性。 字串應當地語系化為目前文化特性。

適用於

RegexMatchTimeoutException(SerializationInfo, StreamingContext)

Source:
RegexMatchTimeoutException.cs
Source:
RegexMatchTimeoutException.cs
Source:
RegexMatchTimeoutException.cs

警告

This API supports obsolete formatter-based serialization. It should not be called or extended by application code.

使用序列化資料,初始化 RegexMatchTimeoutException 類別的新執行個體。

protected:
 RegexMatchTimeoutException(System::Runtime::Serialization::SerializationInfo ^ info, System::Runtime::Serialization::StreamingContext context);
protected RegexMatchTimeoutException (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 RegexMatchTimeoutException (System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context);
new System.Text.RegularExpressions.RegexMatchTimeoutException : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> System.Text.RegularExpressions.RegexMatchTimeoutException
[<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.Text.RegularExpressions.RegexMatchTimeoutException : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> System.Text.RegularExpressions.RegexMatchTimeoutException
Protected Sub New (info As SerializationInfo, context As StreamingContext)

參數

info
SerializationInfo

包含已序列化資料的物件。

context
StreamingContext

包含已序列化資料的資料流。

屬性

備註

您的程式碼不會直接呼叫這個建構函式來具現化 RegexMatchTimeoutException 物件。 相反地,從資料流程還原序列化 RegexMatchTimeoutException 物件時,方法會呼叫 IFormatter.Deserialize 它。

適用於

RegexMatchTimeoutException(String, Exception)

Source:
RegexMatchTimeoutException.cs
Source:
RegexMatchTimeoutException.cs
Source:
RegexMatchTimeoutException.cs

使用指定的錯誤訊息以及造成此例外狀況的內部例外狀況的參考,初始化 RegexMatchTimeoutException 類別的新執行個體。

public:
 RegexMatchTimeoutException(System::String ^ message, Exception ^ inner);
public RegexMatchTimeoutException (string message, Exception inner);
new System.Text.RegularExpressions.RegexMatchTimeoutException : string * Exception -> System.Text.RegularExpressions.RegexMatchTimeoutException
Public Sub New (message As String, inner As Exception)

參數

message
String

描述例外狀況的字串。

inner
Exception

做為目前例外狀況發生原因的例外狀況。

備註

一般而言,您會使用此多載來處理區塊中的 try/catch 例外狀況。 參數 innerException 應該是區塊中 catch 處理之例外狀況物件的參考,或者可以是 null 。 這個值接著會指派給 RegexMatchTimeoutException 物件的 Exception.InnerException 屬性。

字串 message 會指派給 Exception.Message 屬性。 字串應當地語系化為目前文化特性。

適用於

RegexMatchTimeoutException(String, String, TimeSpan)

Source:
RegexMatchTimeoutException.cs
Source:
RegexMatchTimeoutException.cs
Source:
RegexMatchTimeoutException.cs

使用規則運算式模式、輸入文字,以及逾時間隔的相關資訊,初始化 RegexMatchTimeoutException 類別的新執行個體。

public:
 RegexMatchTimeoutException(System::String ^ regexInput, System::String ^ regexPattern, TimeSpan matchTimeout);
public RegexMatchTimeoutException (string regexInput, string regexPattern, TimeSpan matchTimeout);
new System.Text.RegularExpressions.RegexMatchTimeoutException : string * string * TimeSpan -> System.Text.RegularExpressions.RegexMatchTimeoutException
Public Sub New (regexInput As String, regexPattern As String, matchTimeout As TimeSpan)

參數

regexInput
String

當發生逾時,由規則運算式引擎所處理的輸入文字。

regexPattern
String

當發生逾時,由規則運算式引擎所使用的模式。

matchTimeout
TimeSpan

逾時間隔。

備註

regexInputregexPatternmatchTimeout 值會指派給 InputRegexMatchTimeoutException 物件的 、 PatternMatchTimeout 屬性。

適用於