RegexStringValidatorAttribute.Regex Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets the string used to perform regular-expression validation.
public:
property System::String ^ Regex { System::String ^ get(); };
public string Regex { get; }
member this.Regex : string
Public ReadOnly Property Regex As String
Property Value
The string containing the regular expression used to filter the string assigned to the decorated configuration-element property.
Examples
The following example shows how to use the Regex property.
ConfigurationValidatorBase valBase;
RegexStringValidatorAttribute rstrValAttr =
new RegexStringValidatorAttribute(@"\w+\S*");
// Get the regular expression string.
string regex = rstrValAttr.Regex;
Console.WriteLine("Regular expression: {0}", regex);
Dim valBase As _
ConfigurationValidatorBase
Dim rstrValAttr As _
New RegexStringValidatorAttribute("\w+\S*")
' Get the regular expression string.
Dim regex As String = _
rstrValAttr.Regex
Console.WriteLine( _
"Regular expression: {0}", regex)
Applies to
Συνεργαστείτε μαζί μας στο GitHub
Μπορείτε να βρείτε την πηγή για αυτό το περιεχόμενο στο GitHub, όπου μπορείτε επίσης να δημιουργήσετε και να εξετάσετε ζητήματα και αιτήματα έλξης. Για περισσότερες πληροφορίες, ανατρέξτε στον οδηγό συνεργατών.