IsPublic Property

RegexCompilationInfo.IsPublic Property


Gets or sets a value that indicates whether the compiled regular expression has public visibility.

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

public bool IsPublic { get; set; }

Property Value

Type: System.Boolean

true if the regular expression has public visibility; otherwise, false.

If the IsPublic property is false, the regular expression class defined by the current instance can be instantiated only by code that is executing in the assembly that contains the class. However, because the Regex.CompileToAssembly method generates an assembly that contains only compiled regular expressions and does not allow additional code to be added, there is generally no reason to assign this property a value of false.

.NET Framework
Available since 1.1
Return to top
© 2015 Microsoft