RegexMatchTimeoutException 建構函式

定義

初始化 RegexMatchTimeoutException 類別的新執行個體。Initializes a new instance of the RegexMatchTimeoutException class.

多載

RegexMatchTimeoutException()

使用系統提供的訊息,初始化 RegexMatchTimeoutException 類別的新執行個體。Initializes a new instance of the RegexMatchTimeoutException class with a system-supplied message.

RegexMatchTimeoutException(String)

使用指定的訊息字串,初始化 RegexMatchTimeoutException 類別的新執行個體。Initializes a new instance of the RegexMatchTimeoutException class with the specified message string.

RegexMatchTimeoutException(SerializationInfo, StreamingContext)

使用序列化資料,初始化 RegexMatchTimeoutException 類別的新執行個體。Initializes a new instance of the RegexMatchTimeoutException class with serialized data.

RegexMatchTimeoutException(String, Exception)

使用指定的錯誤訊息以及造成此例外狀況的內部例外狀況的參考,初始化 RegexMatchTimeoutException 類別的新執行個體。Initializes a new instance of the RegexMatchTimeoutException class with a specified error message and a reference to the inner exception that is the cause of this exception.

RegexMatchTimeoutException(String, String, TimeSpan)

使用規則運算式模式、輸入文字,以及逾時間隔的相關資訊,初始化 RegexMatchTimeoutException 類別的新執行個體。Initializes a new instance of the RegexMatchTimeoutException class with information about the regular expression pattern, the input text, and the time-out interval.

RegexMatchTimeoutException()

使用系統提供的訊息,初始化 RegexMatchTimeoutException 類別的新執行個體。Initializes a new instance of the RegexMatchTimeoutException class with a system-supplied message.

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

備註

這是RegexMatchTimeoutException類別的無參數的函式。This is the parameterless constructor of the RegexMatchTimeoutException class. 這個建構函式 (Constructor) 會將新執行個體的 Message 屬性初始化為系統提供用來描述錯誤的訊息。This constructor initializes the Message property of the new instance to a system-supplied message that describes the error. 此訊息已針對目前的系統文化特性當地語系化。This message is localized for the current system culture.

RegexMatchTimeoutException(String)

使用指定的訊息字串,初始化 RegexMatchTimeoutException 類別的新執行個體。Initializes a new instance of the RegexMatchTimeoutException class with the specified message string.

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

描述例外狀況的字串。A string that describes the exception.

備註

message字串會指派Exception.Message給屬性。The message string is assigned to the Exception.Message property. 此字串應針對目前的文化特性當地語系化。The string should be localized for the current culture.

RegexMatchTimeoutException(SerializationInfo, StreamingContext)

使用序列化資料,初始化 RegexMatchTimeoutException 類別的新執行個體。Initializes a new instance of the RegexMatchTimeoutException class with serialized data.

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

參數

info
SerializationInfo

包含已序列化資料的物件。The object that contains the serialized data.

context
StreamingContext

包含已序列化資料的資料流。The stream that contains the serialized data.

備註

您的程式碼不會直接呼叫此函式來RegexMatchTimeoutException具現化物件。This constructor is not called directly by your code to instantiate the RegexMatchTimeoutException object. 相反地, 在從資料流程還原IFormatter.Deserialize RegexMatchTimeoutException序列化物件時, 方法會呼叫它。Instead, it is called by the IFormatter.Deserialize method when deserializing the RegexMatchTimeoutException object from a stream.

RegexMatchTimeoutException(String, Exception)

使用指定的錯誤訊息以及造成此例外狀況的內部例外狀況的參考,初始化 RegexMatchTimeoutException 類別的新執行個體。Initializes a new instance of the RegexMatchTimeoutException class with a specified error message and a reference to the inner exception that is the cause of this exception.

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

描述例外狀況的字串。A string that describes the exception.

inner
Exception

做為目前例外狀況發生原因的例外狀況。The exception that is the cause of the current exception.

備註

一般來說, 您可以使用這個多載來處理try/catch區塊中的例外狀況。Typically, you use this overload to handle an exception in a try/catch block. 參數應該是catch在區塊中處理之例外狀況物件的參考, 也可以是nullinnerExceptionThe innerException parameter should be a reference to the exception object handled in the catch block, or it can be null. 這個值接著會指派RegexMatchTimeoutException給物件的Exception.InnerException屬性。This value is then assigned to the RegexMatchTimeoutException object's Exception.InnerException property.

message字串會指派Exception.Message給屬性。The message string is assigned to the Exception.Message property. 此字串應針對目前的文化特性當地語系化。The string should be localized for the current culture.

RegexMatchTimeoutException(String, String, TimeSpan)

使用規則運算式模式、輸入文字,以及逾時間隔的相關資訊,初始化 RegexMatchTimeoutException 類別的新執行個體。Initializes a new instance of the RegexMatchTimeoutException class with information about the regular expression pattern, the input text, and the time-out interval.

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

當發生逾時,由規則運算式引擎所處理的輸入文字。The input text processed by the regular expression engine when the time-out occurred.

regexPattern
String

當發生逾時,由規則運算式引擎所使用的模式。The pattern used by the regular expression engine when the time-out occurred.

matchTimeout
TimeSpan

逾時間隔。The time-out interval.

備註

Pattern MatchTimeout 、和值會指派Input給新物件的、和屬性。RegexMatchTimeoutException matchTimeout regexPattern regexInputThe regexInput, regexPattern, and matchTimeout values are assigned to the Input, Pattern, and MatchTimeout properties of the new RegexMatchTimeoutException object.

適用於