MaskedTextProvider::Add Method (String^, Int32%, MaskedTextResultHint%)
Adds the characters in the specified input string to the end of the formatted string, and then outputs position and descriptive information.
Assembly: System (in System.dll)
public: bool Add( String^ input, [OutAttribute] int% testPosition, [OutAttribute] MaskedTextResultHint% resultHint )
Parameters
- input
-
Type:
System::String^
A String containing character values 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 all the characters from the input string were added successfully; otherwise false to indicate that no characters were added.
The Add(String^, Int32%, MaskedTextResultHint%) method adds the characters from the input string to the formatted string, starting with the first available position after LastAssignedPosition. This method will fail for any of the following reasons:
Any of the characters in the input value, input, are not printable, or the input value does not match its corresponding mask element.
There are not enough available edit positions in the formatted string after the last assigned position.
If this method fails, no additions are made and the method returns false.
This method functions the same as the overridden version taking a single String parameter, Add(String^), except that it outputs additional information.
Available since 2.0