แก้ไข

แชร์ผ่าน


MaskedTextProvider.VerifyString Method

Definition

Tests whether the specified string could be set successfully.

Overloads

VerifyString(String)

Tests whether the specified string could be set successfully.

VerifyString(String, Int32, MaskedTextResultHint)

Tests whether the specified string could be set successfully, and then outputs position and descriptive information.

VerifyString(String)

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

Tests whether the specified string could be set successfully.

public:
 bool VerifyString(System::String ^ input);
public bool VerifyString (string input);
member this.VerifyString : string -> bool
Public Function VerifyString (input As String) As Boolean

Parameters

input
String

The String value to test.

Returns

true if the specified string represents valid input; otherwise, false.

Remarks

The VerifyString applies the input string against the mask, without actually changing the formatted string, to test whether input would be valid in a corresponding Set operation. This method also returns true if input is null or has zero length.

See also

Applies to

VerifyString(String, Int32, MaskedTextResultHint)

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

Tests whether the specified string could be set successfully, and then outputs position and descriptive information.

public:
 bool VerifyString(System::String ^ input, [Runtime::InteropServices::Out] int % testPosition, [Runtime::InteropServices::Out] System::ComponentModel::MaskedTextResultHint % resultHint);
public bool VerifyString (string input, out int testPosition, out System.ComponentModel.MaskedTextResultHint resultHint);
member this.VerifyString : string * int * MaskedTextResultHint -> bool
Public Function VerifyString (input As String, ByRef testPosition As Integer, ByRef resultHint As MaskedTextResultHint) As Boolean

Parameters

input
String

The String value to test.

testPosition
Int32

If successful, the zero-based position of the last character actually tested; otherwise, the first position where the test failed. An output parameter.

resultHint
MaskedTextResultHint

A MaskedTextResultHint that succinctly describes the result of the test operation. An output parameter.

Returns

true if the specified string represents valid input; otherwise, false.

Remarks

The VerifyString applies the input string against the mask, without actually changing the formatted string, to test whether input would be valid in a corresponding Set operation. This method also returns true if input is null or has zero length.

This version of VerifyString provides two additional output parameters to convey more information about the operation of the method.

See also

Applies to