MaskedTextProvider.ToString Method (Int32, Int32)
Returns a substring of the formatted string.
Assembly: System (in System.dll)
The zero-based position in the formatted string where the output begins.
The number of characters to return.
This version of the overloaded ToString method returns a substring of the formatted string, starting at the position startPos and including the subsequent number of characters specified by the length parameter. The returned string includes prompts and literals according to the current values of the IncludePrompt and IncludeLiterals properties, respectively. The return string will contain the original input characters; the PasswordChar property is always ignored.
Because this method reveals information that is usually protected in the user interface by password characters, it should be used with extreme caution to avoid accidentally revealing sensitive user data.
performs the following actions when there are discrepancies in the input parameters:
If startPos is less than zero, the starting position is set to zero.
If length is greater than the remaining number of characters past the starting position, only the remaining characters are returned.
If length is less than or equal to zero, the Empty string is returned.
Available since 2.0