MaskDescriptor.IsValidMaskDescriptor Method (MaskDescriptor)

 

Returns a value indicating whether the specified mask descriptor is valid and can be added to the masks list.

Namespace:   System.Windows.Forms.Design
Assembly:  System.Design (in System.Design.dll)

public static bool IsValidMaskDescriptor(
	MaskDescriptor maskDescriptor
)

Parameters

maskDescriptor
Type: System.Windows.Forms.Design.MaskDescriptor

The mask descriptor to test for validity.

Return Value

Type: System.Boolean

true if maskDescriptor is valid; otherwise, false.

The IsValidMaskDescriptor method determines whether maskDescriptor is valid and can be added to the masks list.

A valid MaskDescriptor must meet the following conditions.

  • Not null.

  • Not null or an empty mask.

  • Not null or an empty name.

  • Not null or an empty sample.

  • The sample is correct based on the mask and all required edit characters have been provided. This means the mask is completed but not necessarily full.

  • The sample is valid based on the ValidatingType object, if any.

.NET Framework
Available since 2.0
Return to top
Show: