MaskedTextProvider::VerifyString Method (String^, Int32%, MaskedTextResultHint%)

 

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

Namespace:   System.ComponentModel
Assembly:  System (in System.dll)

public:
bool VerifyString(
	String^ input,
	[OutAttribute] int% testPosition,
	[OutAttribute] MaskedTextResultHint% resultHint
)

Parameters

input
Type: System::String^

The String value to test.

testPosition
Type: System::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
Type: System.ComponentModel::MaskedTextResultHint%

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

Return Value

Type: System::Boolean

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

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.

.NET Framework
Available since 2.0
Return to top
Show: