RegexCompilationInfo.IsPublic Property

 
System_CAPS_noteNote

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

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
Show: