Επεξεργασία

Κοινή χρήση μέσω


MaskedTextProvider.ToString Method

Definition

Returns the formatted string.

Overloads

ToString(Boolean, Boolean, Boolean, Int32, Int32)

Returns a substring of the formatted string, optionally including prompt, literal, and password characters.

ToString(Boolean, Boolean, Int32, Int32)

Returns a substring of the formatted string, optionally including prompt and literal characters.

ToString(Boolean, Int32, Int32)

Returns a substring of the formatted string, optionally including password characters.

ToString(Boolean)

Returns the formatted string, optionally including password characters.

ToString(Boolean, Boolean)

Returns the formatted string, optionally including prompt and literal characters.

ToString()

Returns the formatted string that includes all the assigned character values.

ToString(Int32, Int32)

Returns a substring of the formatted string.

ToString(Boolean, Boolean, Boolean, Int32, Int32)

Source:
MaskedTextProvider.cs
Source:
MaskedTextProvider.cs
Source:
MaskedTextProvider.cs

Returns a substring of the formatted string, optionally including prompt, literal, and password characters.

public:
 System::String ^ ToString(bool ignorePasswordChar, bool includePrompt, bool includeLiterals, int startPosition, int length);
public string ToString (bool ignorePasswordChar, bool includePrompt, bool includeLiterals, int startPosition, int length);
override this.ToString : bool * bool * bool * int * int -> string
Public Function ToString (ignorePasswordChar As Boolean, includePrompt As Boolean, includeLiterals As Boolean, startPosition As Integer, length As Integer) As String

Parameters

ignorePasswordChar
Boolean

true to return the actual editable characters; otherwise, false to indicate that the PasswordChar property is to be honored.

includePrompt
Boolean

true to include prompt characters in the return string; otherwise, false.

includeLiterals
Boolean

true to return literal characters in the return string; otherwise, false.

startPosition
Int32

The zero-based position in the formatted string where the output begins.

length
Int32

The number of characters to return.

Returns

If successful, a substring of the formatted String, which includes all the assigned character values and optionally includes literals, prompts, and password characters; otherwise the Empty string.

Remarks

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 return string includes prompts and literals according to the values of the IncludePrompt and IncludeLiterals parameters, respectively. Notice that these parameters override the values of the IncludePrompt and IncludeLiterals properties. If the ignorePasswordChar parameter is true, it will return the original input characters, ignoring the value of the PasswordChar property. If this parameter is false, it will use the password character to obscure editable user input if the PasswordChar property is set to a value other than null.

Important

Because this method potentially 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.

ToString 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 startPos is greater than or equal to the actual Length of the formatted string, the Empty string is returned.

  • 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.

See also

Applies to

ToString(Boolean, Boolean, Int32, Int32)

Source:
MaskedTextProvider.cs
Source:
MaskedTextProvider.cs
Source:
MaskedTextProvider.cs

Returns a substring of the formatted string, optionally including prompt and literal characters.

public:
 System::String ^ ToString(bool includePrompt, bool includeLiterals, int startPosition, int length);
public string ToString (bool includePrompt, bool includeLiterals, int startPosition, int length);
override this.ToString : bool * bool * int * int -> string
Public Function ToString (includePrompt As Boolean, includeLiterals As Boolean, startPosition As Integer, length As Integer) As String

Parameters

includePrompt
Boolean

true to include prompt characters in the return string; otherwise, false.

includeLiterals
Boolean

true to include literal characters in the return string; otherwise, false.

startPosition
Int32

The zero-based position in the formatted string where the output begins.

length
Int32

The number of characters to return.

Returns

If successful, a substring of the formatted String, which includes all the assigned character values and optionally includes literals and prompts; otherwise the Empty string.

Remarks

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 return string includes prompts and literals according to the values of the IncludePrompt and IncludeLiterals parameters, respectively. Notice that these parameters override the values of the IncludePromptIncludeLiterals properties. This method will always return the original input characters, ignoring the value of the PasswordChar property.

Important

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.

ToString 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 startPos is greater than or equal to the actual Length of the formatted string, the Empty string is returned.

  • 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.

See also

Applies to

ToString(Boolean, Int32, Int32)

Source:
MaskedTextProvider.cs
Source:
MaskedTextProvider.cs
Source:
MaskedTextProvider.cs

Returns a substring of the formatted string, optionally including password characters.

public:
 System::String ^ ToString(bool ignorePasswordChar, int startPosition, int length);
public string ToString (bool ignorePasswordChar, int startPosition, int length);
override this.ToString : bool * int * int -> string
Public Function ToString (ignorePasswordChar As Boolean, startPosition As Integer, length As Integer) As String

Parameters

ignorePasswordChar
Boolean

true to return the actual editable characters; otherwise, false to indicate that the PasswordChar property is to be honored.

startPosition
Int32

The zero-based position in the formatted string where the output begins.

length
Int32

The number of characters to return.

Returns

If successful, a substring of the formatted String, which includes literals, prompts, and optionally password characters; otherwise the Empty string.

Remarks

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. If the ignorePasswordChar parameter is true, it will return the original input characters, ignoring the value of the PasswordChar property. If this parameter is false, it will use the password character to obscure editable user input if the PasswordChar property is set to a value other than null.

Important

Because this method potentially 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.

ToString 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 startPos is greater than or equal to the actual Length of the formatted string, the Empty string is returned.

  • 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.

See also

Applies to

ToString(Boolean)

Source:
MaskedTextProvider.cs
Source:
MaskedTextProvider.cs
Source:
MaskedTextProvider.cs

Returns the formatted string, optionally including password characters.

public:
 System::String ^ ToString(bool ignorePasswordChar);
public string ToString (bool ignorePasswordChar);
override this.ToString : bool -> string
Public Function ToString (ignorePasswordChar As Boolean) As String

Parameters

ignorePasswordChar
Boolean

true to return the actual editable characters; otherwise, false to indicate that the PasswordChar property is to be honored.

Returns

The formatted String that includes literals, prompts, and optionally password characters.

Remarks

This version of the overloaded ToString method includes prompts and literals according to the current values of the IncludePrompt and IncludeLiterals properties, respectively. If the ignorePasswordChar parameter is true, it will return the original input characters, ignoring the value of the PasswordChar property. If this parameter is false, it will use the password character to obscure editable user input if the PasswordChar property is set to a value other than null.

Important

Because this method potentially 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.

See also

Applies to

ToString(Boolean, Boolean)

Source:
MaskedTextProvider.cs
Source:
MaskedTextProvider.cs
Source:
MaskedTextProvider.cs

Returns the formatted string, optionally including prompt and literal characters.

public:
 System::String ^ ToString(bool includePrompt, bool includeLiterals);
public string ToString (bool includePrompt, bool includeLiterals);
override this.ToString : bool * bool -> string
Public Function ToString (includePrompt As Boolean, includeLiterals As Boolean) As String

Parameters

includePrompt
Boolean

true to include prompt characters in the return string; otherwise, false.

includeLiterals
Boolean

true to include literal characters in the return string; otherwise, false.

Returns

The formatted String that includes all the assigned character values and optionally includes literals and prompts.

Remarks

This version of the overloaded ToString method includes prompts and literals according to the values of the IncludePrompt and IncludeLiterals parameters, respectively. Notice that these parameters override the values of the IncludePromptIncludeLiterals properties. This method will always return the original input characters, ignoring the value of the PasswordChar property.

Important

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.

See also

Applies to

ToString()

Source:
MaskedTextProvider.cs
Source:
MaskedTextProvider.cs
Source:
MaskedTextProvider.cs

Returns the formatted string that includes all the assigned character values.

public:
 override System::String ^ ToString();
public override string ToString ();
override this.ToString : unit -> string
Public Overrides Function ToString () As String

Returns

The formatted String that includes all the assigned character values.

Remarks

This version of the overloaded ToString method includes prompts and literals according to the current values of the IncludePrompt and IncludeLiterals properties, respectively. It will always return the original input characters, ignoring the value of the PasswordChar property.

Important

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.

See also

Applies to

ToString(Int32, Int32)

Source:
MaskedTextProvider.cs
Source:
MaskedTextProvider.cs
Source:
MaskedTextProvider.cs

Returns a substring of the formatted string.

public:
 System::String ^ ToString(int startPosition, int length);
public string ToString (int startPosition, int length);
override this.ToString : int * int -> string
Public Function ToString (startPosition As Integer, length As Integer) As String

Parameters

startPosition
Int32

The zero-based position in the formatted string where the output begins.

length
Int32

The number of characters to return.

Returns

If successful, a substring of the formatted String, which includes all the assigned character values; otherwise the Empty string.

Remarks

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.

Important

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.

ToString 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 startPos is greater than or equal to the actual Length of the formatted string, the Empty string is returned.

  • 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.

See also

Applies to