RegexMatchTimeoutException Constructors

Definition

Initializes a new instance of the RegexMatchTimeoutException class.

Overloads

RegexMatchTimeoutException()

Initializes a new instance of the RegexMatchTimeoutException class with a system-supplied message.

RegexMatchTimeoutException(String)

Initializes a new instance of the RegexMatchTimeoutException class with the specified message string.

RegexMatchTimeoutException(SerializationInfo, StreamingContext)
Obsolete.

Initializes a new instance of the RegexMatchTimeoutException class with serialized data.

RegexMatchTimeoutException(String, Exception)

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)

Initializes a new instance of the RegexMatchTimeoutException class with information about the regular expression pattern, the input text, and the time-out interval.

RegexMatchTimeoutException()

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

Initializes a new instance of the RegexMatchTimeoutException class with a system-supplied message.

C#
public RegexMatchTimeoutException();

Remarks

This is the parameterless constructor of the RegexMatchTimeoutException class. 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.

Applies to

.NET 10 ja muut versiot
Tuote Versiot
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 1.0, 1.1, 1.2, 1.3, 1.4, 1.6, 2.0, 2.1
UWP 10.0

RegexMatchTimeoutException(String)

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

Initializes a new instance of the RegexMatchTimeoutException class with the specified message string.

C#
public RegexMatchTimeoutException(string message);

Parameters

message
String

A string that describes the exception.

Remarks

The message string is assigned to the Exception.Message property. The string should be localized for the current culture.

Applies to

.NET 10 ja muut versiot
Tuote Versiot
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 1.0, 1.1, 1.2, 1.3, 1.4, 1.6, 2.0, 2.1
UWP 10.0

RegexMatchTimeoutException(SerializationInfo, StreamingContext)

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

Caution

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

Initializes a new instance of the RegexMatchTimeoutException class with serialized data.

C#
[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);
C#
protected RegexMatchTimeoutException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context);

Parameters

info
SerializationInfo

The object that contains the serialized data.

context
StreamingContext

The stream that contains the serialized data.

Attributes

Remarks

This constructor is not called directly by your code to instantiate the RegexMatchTimeoutException object. Instead, it is called by the IFormatter.Deserialize method when deserializing the RegexMatchTimeoutException object from a stream.

Applies to

.NET 10 ja muut versiot
Tuote Versiot (Vanhentunut)
.NET Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7 (8, 9, 10)
.NET Framework 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1

RegexMatchTimeoutException(String, Exception)

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

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.

C#
public RegexMatchTimeoutException(string message, Exception inner);

Parameters

message
String

A string that describes the exception.

inner
Exception

The exception that is the cause of the current exception.

Remarks

Typically, you use this overload to handle an exception in a try/catch block. The innerException parameter should be a reference to the exception object handled in the catch block, or it can be null. This value is then assigned to the RegexMatchTimeoutException object's Exception.InnerException property.

The message string is assigned to the Exception.Message property. The string should be localized for the current culture.

Applies to

.NET 10 ja muut versiot
Tuote Versiot
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 1.0, 1.1, 1.2, 1.3, 1.4, 1.6, 2.0, 2.1
UWP 10.0

RegexMatchTimeoutException(String, String, TimeSpan)

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

Initializes a new instance of the RegexMatchTimeoutException class with information about the regular expression pattern, the input text, and the time-out interval.

C#
public RegexMatchTimeoutException(string regexInput, string regexPattern, TimeSpan matchTimeout);

Parameters

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.

Remarks

The regexInput, regexPattern, and matchTimeout values are assigned to the Input, Pattern, and MatchTimeout properties of the new RegexMatchTimeoutException object.

Applies to

.NET 10 ja muut versiot
Tuote Versiot
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 1.0, 1.1, 1.2, 1.3, 1.4, 1.6, 2.0, 2.1
UWP 10.0