ElementInformation.Validator Property
.NET Framework (current version)
Gets the object used to validate the associated ConfigurationElement object.
Assembly: System.Configuration (in System.Configuration.dll)
Property Value
Type: System.Configuration.ConfigurationValidatorBaseThe object used to validate the associated ConfigurationElement object.
A validator object is not required, and this property may return null.
The following example shows how to use the Validator property.
Public Shared Sub GetElementValidator() ' Get the current configuration file. Dim config _ As System.Configuration.Configuration = _ ConfigurationManager.OpenExeConfiguration( _ ConfigurationUserLevel.None) ' Get the section. Dim section As UrlsSection = _ CType(config.GetSection("MyUrls"), UrlsSection) ' Get the element. Dim url As UrlConfigElement = _ section.Simple ' Get the element source file. Dim elValidator _ As ConfigurationValidatorBase = _ url.ElementInformation.Validator Console.WriteLine("Url element validator: {0}", _ elValidator.ToString()) End Sub 'GetElementValidator
.NET Framework
Available since 2.0
Available since 2.0
Show: