संपादित करें

इसके माध्यम से साझा किया गया


MaskedTextProvider Constructors

Definition

Initializes a new instance of the MaskedTextProvider class.

Overloads

MaskedTextProvider(String)

Initializes a new instance of the MaskedTextProvider class using the specified mask.

MaskedTextProvider(String, Boolean)

Initializes a new instance of the MaskedTextProvider class using the specified mask and ASCII restriction value.

MaskedTextProvider(String, CultureInfo)

Initializes a new instance of the MaskedTextProvider class using the specified mask and culture.

MaskedTextProvider(String, Char, Boolean)

Initializes a new instance of the MaskedTextProvider class using the specified mask, password character, and prompt usage value.

MaskedTextProvider(String, CultureInfo, Boolean)

Initializes a new instance of the MaskedTextProvider class using the specified mask, culture, and ASCII restriction value.

MaskedTextProvider(String, CultureInfo, Char, Boolean)

Initializes a new instance of the MaskedTextProvider class using the specified mask, culture, password character, and prompt usage value.

MaskedTextProvider(String, CultureInfo, Boolean, Char, Char, Boolean)

Initializes a new instance of the MaskedTextProvider class using the specified mask, culture, prompt usage value, prompt character, password character, and ASCII restriction value.

MaskedTextProvider(String)

Source:
MaskedTextProvider.cs
Source:
MaskedTextProvider.cs
Source:
MaskedTextProvider.cs

Initializes a new instance of the MaskedTextProvider class using the specified mask.

public:
 MaskedTextProvider(System::String ^ mask);
public MaskedTextProvider (string mask);
new System.ComponentModel.MaskedTextProvider : string -> System.ComponentModel.MaskedTextProvider
Public Sub New (mask As String)

Parameters

mask
String

A String that represents the input mask.

Remarks

Use of this constructor is exactly equivalent to the following call to the MaskedTextProvider.MaskedTextProvider(String, CultureInfo, Boolean, Char, Char, Boolean) constructor:

MaskedTextProvider(mask , null, true, '_', '\0', false)

See also

Applies to

MaskedTextProvider(String, Boolean)

Source:
MaskedTextProvider.cs
Source:
MaskedTextProvider.cs
Source:
MaskedTextProvider.cs

Initializes a new instance of the MaskedTextProvider class using the specified mask and ASCII restriction value.

public:
 MaskedTextProvider(System::String ^ mask, bool restrictToAscii);
public MaskedTextProvider (string mask, bool restrictToAscii);
new System.ComponentModel.MaskedTextProvider : string * bool -> System.ComponentModel.MaskedTextProvider
Public Sub New (mask As String, restrictToAscii As Boolean)

Parameters

mask
String

A String that represents the input mask.

restrictToAscii
Boolean

true to restrict input to ASCII-compatible characters; otherwise false to allow the entire Unicode set.

Remarks

Use of this constructor is exactly equivalent to the following call to the MaskedTextProvider.MaskedTextProvider(String, CultureInfo, Boolean, Char, Char, Boolean) constructor:

MaskedTextProvider(mask , null, true, '_', '\0', restrictToASCII)

See also

Applies to

MaskedTextProvider(String, CultureInfo)

Source:
MaskedTextProvider.cs
Source:
MaskedTextProvider.cs
Source:
MaskedTextProvider.cs

Initializes a new instance of the MaskedTextProvider class using the specified mask and culture.

public:
 MaskedTextProvider(System::String ^ mask, System::Globalization::CultureInfo ^ culture);
public MaskedTextProvider (string mask, System.Globalization.CultureInfo culture);
public MaskedTextProvider (string mask, System.Globalization.CultureInfo? culture);
new System.ComponentModel.MaskedTextProvider : string * System.Globalization.CultureInfo -> System.ComponentModel.MaskedTextProvider
Public Sub New (mask As String, culture As CultureInfo)

Parameters

mask
String

A String that represents the input mask.

culture
CultureInfo

A CultureInfo that is used to set region-sensitive separator characters.

Remarks

Use of this constructor is exactly equivalent to the following call to the MaskedTextProvider.MaskedTextProvider(String, CultureInfo, Boolean, Char, Char, Boolean) constructor:

MaskedTextProvider(mask , culture, true, '_', '\0', false)

See also

Applies to

MaskedTextProvider(String, Char, Boolean)

Source:
MaskedTextProvider.cs
Source:
MaskedTextProvider.cs
Source:
MaskedTextProvider.cs

Initializes a new instance of the MaskedTextProvider class using the specified mask, password character, and prompt usage value.

public:
 MaskedTextProvider(System::String ^ mask, char passwordChar, bool allowPromptAsInput);
public MaskedTextProvider (string mask, char passwordChar, bool allowPromptAsInput);
new System.ComponentModel.MaskedTextProvider : string * char * bool -> System.ComponentModel.MaskedTextProvider
Public Sub New (mask As String, passwordChar As Char, allowPromptAsInput As Boolean)

Parameters

mask
String

A String that represents the input mask.

passwordChar
Char

A Char that will be displayed for characters entered into a password string.

allowPromptAsInput
Boolean

true to allow the prompt character as input; otherwise false.

Remarks

Use of this constructor is exactly equivalent to the following call to the MaskedTextProvider.MaskedTextProvider(String, CultureInfo, Boolean, Char, Char, Boolean) constructor:

MaskedTextProvider(mask , null, allowPromptAsInput, '_', passwordChar, false)

See also

Applies to

MaskedTextProvider(String, CultureInfo, Boolean)

Source:
MaskedTextProvider.cs
Source:
MaskedTextProvider.cs
Source:
MaskedTextProvider.cs

Initializes a new instance of the MaskedTextProvider class using the specified mask, culture, and ASCII restriction value.

public:
 MaskedTextProvider(System::String ^ mask, System::Globalization::CultureInfo ^ culture, bool restrictToAscii);
public MaskedTextProvider (string mask, System.Globalization.CultureInfo culture, bool restrictToAscii);
public MaskedTextProvider (string mask, System.Globalization.CultureInfo? culture, bool restrictToAscii);
new System.ComponentModel.MaskedTextProvider : string * System.Globalization.CultureInfo * bool -> System.ComponentModel.MaskedTextProvider
Public Sub New (mask As String, culture As CultureInfo, restrictToAscii As Boolean)

Parameters

mask
String

A String that represents the input mask.

culture
CultureInfo

A CultureInfo that is used to set region-sensitive separator characters.

restrictToAscii
Boolean

true to restrict input to ASCII-compatible characters; otherwise false to allow the entire Unicode set.

Remarks

Use of this constructor is exactly equivalent to the following call to the MaskedTextProvider.MaskedTextProvider(String, CultureInfo, Boolean, Char, Char, Boolean) constructor:

MaskedTextProvider(mask , culture, true, '_', '\0', restrictToAscii)

See also

Applies to

MaskedTextProvider(String, CultureInfo, Char, Boolean)

Source:
MaskedTextProvider.cs
Source:
MaskedTextProvider.cs
Source:
MaskedTextProvider.cs

Initializes a new instance of the MaskedTextProvider class using the specified mask, culture, password character, and prompt usage value.

public:
 MaskedTextProvider(System::String ^ mask, System::Globalization::CultureInfo ^ culture, char passwordChar, bool allowPromptAsInput);
public MaskedTextProvider (string mask, System.Globalization.CultureInfo culture, char passwordChar, bool allowPromptAsInput);
public MaskedTextProvider (string mask, System.Globalization.CultureInfo? culture, char passwordChar, bool allowPromptAsInput);
new System.ComponentModel.MaskedTextProvider : string * System.Globalization.CultureInfo * char * bool -> System.ComponentModel.MaskedTextProvider
Public Sub New (mask As String, culture As CultureInfo, passwordChar As Char, allowPromptAsInput As Boolean)

Parameters

mask
String

A String that represents the input mask.

culture
CultureInfo

A CultureInfo that is used to set region-sensitive separator characters.

passwordChar
Char

A Char that will be displayed for characters entered into a password string.

allowPromptAsInput
Boolean

true to allow the prompt character as input; otherwise false.

Remarks

Use of this constructor is exactly equivalent to the following call to the MaskedTextProvider.MaskedTextProvider(String, CultureInfo, Boolean, Char, Char, Boolean) constructor:

MaskedTextProvider(mask , culture, allowPromptAsInput, '_', passwordChar, false)

See also

Applies to

MaskedTextProvider(String, CultureInfo, Boolean, Char, Char, Boolean)

Source:
MaskedTextProvider.cs
Source:
MaskedTextProvider.cs
Source:
MaskedTextProvider.cs

Initializes a new instance of the MaskedTextProvider class using the specified mask, culture, prompt usage value, prompt character, password character, and ASCII restriction value.

public:
 MaskedTextProvider(System::String ^ mask, System::Globalization::CultureInfo ^ culture, bool allowPromptAsInput, char promptChar, char passwordChar, bool restrictToAscii);
public MaskedTextProvider (string mask, System.Globalization.CultureInfo culture, bool allowPromptAsInput, char promptChar, char passwordChar, bool restrictToAscii);
public MaskedTextProvider (string mask, System.Globalization.CultureInfo? culture, bool allowPromptAsInput, char promptChar, char passwordChar, bool restrictToAscii);
new System.ComponentModel.MaskedTextProvider : string * System.Globalization.CultureInfo * bool * char * char * bool -> System.ComponentModel.MaskedTextProvider
Public Sub New (mask As String, culture As CultureInfo, allowPromptAsInput As Boolean, promptChar As Char, passwordChar As Char, restrictToAscii As Boolean)

Parameters

mask
String

A String that represents the input mask.

culture
CultureInfo

A CultureInfo that is used to set region-sensitive separator characters.

allowPromptAsInput
Boolean

A Boolean value that specifies whether the prompt character should be allowed as a valid input character.

promptChar
Char

A Char that will be displayed as a placeholder for user input.

passwordChar
Char

A Char that will be displayed for characters entered into a password string.

restrictToAscii
Boolean

true to restrict input to ASCII-compatible characters; otherwise false to allow the entire Unicode set.

Exceptions

The mask parameter is null or Empty.

-or-

The mask contains one or more non-printable characters.

Remarks

This constructor represents the most general overloaded form. The mask parameter must conform to the masking language defined by the MaskedTextProvider class, which is detailed in the MaskedTextBox.Mask property of the MaskedTextBox class.

Because neutral cultures cannot be queried for culture-specific information, the MaskedTextProvider constructor will use the GetCultures method to search for the first non-neutral culture to use to determine the proper separator characters.

See also

Applies to