MaskedTextProvider::Add Method (Char, Int32%, MaskedTextResultHint%)
Adds the specified input character to the end of the formatted string, and then outputs position and descriptive information.
Assembly: System (in System.dll)
public: bool Add( wchar_t input, [OutAttribute] int% testPosition, [OutAttribute] MaskedTextResultHint% resultHint )
Parameters
- input
-
Type:
System::Char
A Char value to be appended to the formatted string.
- testPosition
-
Type:
System::Int32%
The zero-based position in the formatted string where the attempt was made to add the character. An output parameter.
- resultHint
-
Type:
System.ComponentModel::MaskedTextResultHint%
A MaskedTextResultHint that succinctly describes the result of the operation. An output parameter.
Return Value
Type: System::Booleantrue if the input character was added successfully; otherwise false.
The Add(Char, Int32%, MaskedTextResultHint%) method attempts to add the input character value to the first available position in the formatted string after the position that was last assigned, which is represented by the LastAssignedPosition property. This method will fail if all available positions are before the last assigned position. This method will fail for any of the following reasons:
The input value, input, is not printable, or it does not match its corresponding mask element.
There are zero available edit positions in the formatted string, or there are no available edit positions after the last assigned position.
This method functions the same as the overridden version taking a single Char parameter, Add(Char), except that it outputs additional information.
Available since 2.0