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. 此构造函数将新实例的 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. innerException 参数应是对 catch 块中处理的异常对象的引用,也可以是 nullThe 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.

注解

regexInputregexPatternmatchTimeout 值将分配给新 Pattern对象的 InputMatchTimeoutRegexMatchTimeoutException 属性。The regexInput, regexPattern, and matchTimeout values are assigned to the Input, Pattern, and MatchTimeout properties of the new RegexMatchTimeoutException object.

适用于