Breyta

Deila með


MaskedTextProvider.Add Method

Definition

Adds an input character or input string to the formatted string.

Overloads

Add(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.

Add(Char, Int32, MaskedTextResultHint)

Adds the specified input character to the end of the formatted string, and then outputs position and descriptive information.

Add(Char)

Adds the specified input character to the end of the formatted string.

Add(String)

Adds the characters in the specified input string to the end of the formatted string.

Add(String, Int32, MaskedTextResultHint)

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

Adds the characters in the specified input string to the end of the formatted string, and then outputs position and descriptive information.

public:
 bool Add(System::String ^ input, [Runtime::InteropServices::Out] int % testPosition, [Runtime::InteropServices::Out] System::ComponentModel::MaskedTextResultHint % resultHint);
public bool Add (string input, out int testPosition, out System.ComponentModel.MaskedTextResultHint resultHint);
member this.Add : string * int * MaskedTextResultHint -> bool
Public Function Add (input As String, ByRef testPosition As Integer, ByRef resultHint As MaskedTextResultHint) As Boolean

Parameters

input
String

A String containing character values to be appended to the formatted string.

testPosition
Int32

The zero-based position in the formatted string where the attempt was made to add the character. An output parameter.

resultHint
MaskedTextResultHint

A MaskedTextResultHint that succinctly describes the result of the operation. An output parameter.

Returns

true if all the characters from the input string were added successfully; otherwise false to indicate that no characters were added.

Remarks

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.

See also

Applies to

Add(Char, Int32, MaskedTextResultHint)

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

Adds the specified input character to the end of the formatted string, and then outputs position and descriptive information.

public:
 bool Add(char input, [Runtime::InteropServices::Out] int % testPosition, [Runtime::InteropServices::Out] System::ComponentModel::MaskedTextResultHint % resultHint);
public bool Add (char input, out int testPosition, out System.ComponentModel.MaskedTextResultHint resultHint);
member this.Add : char * int * MaskedTextResultHint -> bool
Public Function Add (input As Char, ByRef testPosition As Integer, ByRef resultHint As MaskedTextResultHint) As Boolean

Parameters

input
Char

A Char value to be appended to the formatted string.

testPosition
Int32

The zero-based position in the formatted string where the attempt was made to add the character. An output parameter.

resultHint
MaskedTextResultHint

A MaskedTextResultHint that succinctly describes the result of the operation. An output parameter.

Returns

true if the input character was added successfully; otherwise false.

Remarks

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.

See also

Applies to

Add(Char)

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

Adds the specified input character to the end of the formatted string.

public:
 bool Add(char input);
public bool Add (char input);
member this.Add : char -> bool
Public Function Add (input As Char) As Boolean

Parameters

input
Char

A Char value to be appended to the formatted string.

Returns

true if the input character was added successfully; otherwise false.

Remarks

The Add(Char) method adds 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 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.

See also

Applies to

Add(String)

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

Adds the characters in the specified input string to the end of the formatted string.

public:
 bool Add(System::String ^ input);
public bool Add (string input);
member this.Add : string -> bool
Public Function Add (input As String) As Boolean

Parameters

input
String

A String containing character values to be appended to the formatted string.

Returns

true if all the characters from the input string were added successfully; otherwise false to indicate that no characters were added.

Exceptions

The input parameter is null.

Remarks

The Add(String) 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.

See also

Applies to