MaskDescriptor.IsValidMaskDescriptor Method

Definition

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)

Source:
MaskDescriptor.cs
Source:
MaskDescriptor.cs
Source:
MaskDescriptor.cs

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

C#
public static bool IsValidMaskDescriptor(System.Windows.Forms.Design.MaskDescriptor maskDescriptor);
C#
public static bool IsValidMaskDescriptor(System.Windows.Forms.Design.MaskDescriptor? maskDescriptor);

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

.NET Framework 4.8.1 i druge verzije
Proizvod Verzije
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.1, 5, 6, 7, 8, 9, 10

IsValidMaskDescriptor(MaskDescriptor, String)

Source:
MaskDescriptor.cs
Source:
MaskDescriptor.cs
Source:
MaskDescriptor.cs

Returns a value indicating whether the specified mask descriptor is valid, and provides an error description if it is not valid.

C#
public static bool IsValidMaskDescriptor(System.Windows.Forms.Design.MaskDescriptor maskDescriptor, out string validationErrorDescription);
C#
public static bool IsValidMaskDescriptor(System.Windows.Forms.Design.MaskDescriptor? maskDescriptor, out string validationErrorDescription);

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.

See also

Applies to

.NET Framework 4.8.1 i druge verzije
Proizvod Verzije
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.1, 5, 6, 7, 8, 9, 10