SubclassTypeValidator Class

 

Validates that an object is a derived class of a specified type.

Namespace:   System.Configuration
Assembly:  System.Configuration (in System.Configuration.dll)

System::Object
  System.Configuration::ConfigurationValidatorBase
    System.Configuration::SubclassTypeValidator

public ref class SubclassTypeValidator sealed : ConfigurationValidatorBase

NameDescription
System_CAPS_pubmethodSubclassTypeValidator(Type^)

Initializes a new instance of the SubclassTypeValidator class.

NameDescription
System_CAPS_pubmethodCanValidate(Type^)

Determines whether an object can be validated based on type.(Overrides ConfigurationValidatorBase::CanValidate(Type^).)

System_CAPS_pubmethodEquals(Object^)

Determines whether the specified object is equal to the current object.(Inherited from Object.)

System_CAPS_pubmethodGetHashCode()

Serves as the default hash function. (Inherited from Object.)

System_CAPS_pubmethodGetType()

Gets the Type of the current instance.(Inherited from Object.)

System_CAPS_pubmethodToString()

Returns a string that represents the current object.(Inherited from Object.)

System_CAPS_pubmethodValidate(Object^)

Determines whether the value of an object is valid. (Overrides ConfigurationValidatorBase::Validate(Object^).)

The SubclassTypeValidator class is used to ensure that an object meets specific criteria. The criteria for validation is established when an instance of the SubclassTypeValidator class is created.

The CanValidate method determines whether the type of the object being validated is in fact a Type. The object being validated is passed as a parameter of the Validate method. This method first verifies that the object to validate is not null, and then verifies that the object is a derived class of the expected type.

.NET Framework
Available since 2.0

Any public static ( Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
Show: