GeneratedRegexAttribute Constructors

Definition

Overloads

GeneratedRegexAttribute(String)

Initializes a new instance of GeneratedRegexAttribute with the specified pattern.

GeneratedRegexAttribute(String, RegexOptions)

Initializes a new instance of GeneratedRegexAttribute with the specified pattern and options.

GeneratedRegexAttribute(String, RegexOptions, Int32)

Initializes a new instance of GeneratedRegexAttribute with the specified pattern, options, and time-out value.

GeneratedRegexAttribute(String, RegexOptions, String)

Initializes a new instance of GeneratedRegexAttribute with the specified pattern and options.

GeneratedRegexAttribute(String, RegexOptions, Int32, String)

Initializes a new instance of GeneratedRegexAttribute with the specified pattern, options, time-out value, and culture.

GeneratedRegexAttribute(String)

Source:
GeneratedRegexAttribute.cs
Source:
GeneratedRegexAttribute.cs
Source:
GeneratedRegexAttribute.cs

Initializes a new instance of GeneratedRegexAttribute with the specified pattern.

C#
public GeneratedRegexAttribute(string pattern);

Parameters

pattern
String

The regular expression pattern to match.

Applies to

.NET 10 and other versions
Product Versions
.NET 7, 8, 9, 10

GeneratedRegexAttribute(String, RegexOptions)

Source:
GeneratedRegexAttribute.cs
Source:
GeneratedRegexAttribute.cs
Source:
GeneratedRegexAttribute.cs

Initializes a new instance of GeneratedRegexAttribute with the specified pattern and options.

C#
public GeneratedRegexAttribute(string pattern, System.Text.RegularExpressions.RegexOptions options);

Parameters

pattern
String

The regular expression pattern to match.

options
RegexOptions

A bitwise combination of the enumeration values that modify the regular expression.

Applies to

.NET 10 and other versions
Product Versions
.NET 7, 8, 9, 10

GeneratedRegexAttribute(String, RegexOptions, Int32)

Source:
GeneratedRegexAttribute.cs
Source:
GeneratedRegexAttribute.cs
Source:
GeneratedRegexAttribute.cs

Initializes a new instance of GeneratedRegexAttribute with the specified pattern, options, and time-out value.

C#
public GeneratedRegexAttribute(string pattern, System.Text.RegularExpressions.RegexOptions options, int matchTimeoutMilliseconds);

Parameters

pattern
String

The regular expression pattern to match.

options
RegexOptions

A bitwise combination of the enumeration values that modify the regular expression.

matchTimeoutMilliseconds
Int32

A time-out interval (milliseconds), or Infinite to indicate that the method should not time out.

Applies to

.NET 10 and other versions
Product Versions
.NET 7, 8, 9, 10

GeneratedRegexAttribute(String, RegexOptions, String)

Source:
GeneratedRegexAttribute.cs
Source:
GeneratedRegexAttribute.cs
Source:
GeneratedRegexAttribute.cs

Initializes a new instance of GeneratedRegexAttribute with the specified pattern and options.

C#
public GeneratedRegexAttribute(string pattern, System.Text.RegularExpressions.RegexOptions options, string cultureName);

Parameters

pattern
String

The regular expression pattern to match.

options
RegexOptions

A bitwise combination of the enumeration values that modify the regular expression.

cultureName
String

The name of a culture to be used for case sensitive comparisons. cultureName is not case-sensitive.

Remarks

For a list of predefined culture names on Windows systems, see the Language tag column in the list of language/region names supported by Windows. Culture names follow the standard defined by BCP 47. In addition, starting with Windows 10, cultureName can be any valid BCP-47 language tag. If cultureName is Empty, the invariant culture will be used.

Applies to

.NET 10 and other versions
Product Versions
.NET 7, 8, 9, 10

GeneratedRegexAttribute(String, RegexOptions, Int32, String)

Source:
GeneratedRegexAttribute.cs
Source:
GeneratedRegexAttribute.cs
Source:
GeneratedRegexAttribute.cs

Initializes a new instance of GeneratedRegexAttribute with the specified pattern, options, time-out value, and culture.

C#
public GeneratedRegexAttribute(string pattern, System.Text.RegularExpressions.RegexOptions options, int matchTimeoutMilliseconds, string cultureName);

Parameters

pattern
String

The regular expression pattern to match.

options
RegexOptions

A bitwise combination of the enumeration values that modify the regular expression.

matchTimeoutMilliseconds
Int32

A time-out interval (milliseconds), or Infinite to indicate that the method should not time out.

cultureName
String

The name of a culture to be used for case sensitive comparisons. cultureName is not case-sensitive.

Remarks

For a list of predefined culture names on Windows systems, see the Language tag column in the list of language/region names supported by Windows. Culture names follow the standard defined by BCP 47. In addition, starting with Windows 10, cultureName can be any valid BCP-47 language tag. If cultureName is Empty, the invariant culture will be used.

Applies to

.NET 10 and other versions
Product Versions
.NET 7, 8, 9, 10