MaskedTextProvider.Set Method (String, Int32, MaskedTextResultHint)
Sets the formatted string to the specified input string, and then outputs the removal position and descriptive information.
Assembly: System (in System.dll)
public bool Set( string input, out int testPosition, out MaskedTextResultHint resultHint )
- Type: System.Int32
If successful, the zero-based position in the formatted string where the last character was actually set; otherwise, the first position where the operation failed. An output parameter.
Return ValueType: System.Boolean
true if all the characters were successfully set; otherwise, false.
The Set method clears the existing contents of the formatted string and then applies the mask against the input string to update the contents of the formatted string.
The following conditions are considered errors. When an error occurs, the formatted string remains unaltered and Set returns false.
There are not enough editable positions in the formatted string to hold the contents of the replacement string.
One of the replacement character values is not valid because it is not printable or does not match its corresponding mask element.
This version of Set provides two additional output parameters to convey more information about the operation of the method.
Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.