MaskDescriptor.IsValidMaskDescriptor Method
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.
Returns a value indicating whether the specified mask descriptor is valid and can be added to the masks list.
Overloads
IsValidMaskDescriptor(MaskDescriptor) |
Returns a value indicating whether the specified mask descriptor is valid and can be added to the masks list. |
IsValidMaskDescriptor(MaskDescriptor, String) |
Returns a value indicating whether the specified mask descriptor is valid, and provides an error description if it is not valid. |
IsValidMaskDescriptor(MaskDescriptor)
Returns a value indicating whether the specified mask descriptor is valid and can be added to the masks list.
public:
static bool IsValidMaskDescriptor(System::Windows::Forms::Design::MaskDescriptor ^ maskDescriptor);
public static bool IsValidMaskDescriptor (System.Windows.Forms.Design.MaskDescriptor maskDescriptor);
public static bool IsValidMaskDescriptor (System.Windows.Forms.Design.MaskDescriptor? maskDescriptor);
static member IsValidMaskDescriptor : System.Windows.Forms.Design.MaskDescriptor -> bool
Public Shared Function IsValidMaskDescriptor (maskDescriptor As MaskDescriptor) As Boolean
Parameters
- maskDescriptor
- MaskDescriptor
The mask descriptor to test for validity.
Returns
true
if maskDescriptor
is valid; otherwise, false
.
Remarks
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.
See also
Applies to
IsValidMaskDescriptor(MaskDescriptor, String)
Returns a value indicating whether the specified mask descriptor is valid, and provides an error description if it is not valid.
public:
static bool IsValidMaskDescriptor(System::Windows::Forms::Design::MaskDescriptor ^ maskDescriptor, [Runtime::InteropServices::Out] System::String ^ % validationErrorDescription);
public static bool IsValidMaskDescriptor (System.Windows.Forms.Design.MaskDescriptor maskDescriptor, out string validationErrorDescription);
public static bool IsValidMaskDescriptor (System.Windows.Forms.Design.MaskDescriptor? maskDescriptor, out string validationErrorDescription);
static member IsValidMaskDescriptor : System.Windows.Forms.Design.MaskDescriptor * string -> bool
Public Shared Function IsValidMaskDescriptor (maskDescriptor As MaskDescriptor, ByRef validationErrorDescription As String) As Boolean
Parameters
- maskDescriptor
- MaskDescriptor
The mask descriptor to test for validity.
- validationErrorDescription
- String
A string representing a validation error. If no validation error occurred, the validationErrorDescription
is Empty.
Returns
true
if maskDescriptor
is valid; otherwise, false
.
Remarks
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.