RegexCompilationInfo.Pattern Property


The .NET API Reference documentation has a new home. Visit the .NET API Browser on to see the new experience.

Gets or sets the regular expression to compile.

Namespace:   System.Text.RegularExpressions
Assembly:  System (in System.dll)

public string Pattern { get; set; }

Property Value

Type: System.String

The regular expression to compile.

Exception Condition

The value for this property is null.

The Pattern property can contain any valid regular expression. If the value of the Pattern property is not a syntactically correct regular expression pattern, the call to the CompileToAssembly method throws an ArgumentException.

.NET Framework
Available since 1.1
Return to top