MaskedTextProvider.RemoveAt Método

Definição

Remove um ou mais caracteres atribuídos da cadeia de caracteres formatada.Removes one or more assigned characters from the formatted string.

Sobrecargas

RemoveAt(Int32)

Remove o caractere atribuído na posição especificada da cadeia de caracteres formatada.Removes the assigned character at the specified position from the formatted string.

RemoveAt(Int32, Int32)

Remove o caractere atribuído entre as posições especificadas da cadeia de caracteres formatada.Removes the assigned characters between the specified positions from the formatted string.

RemoveAt(Int32, Int32, Int32, MaskedTextResultHint)

Remove os caracteres atribuídos entre as posições especificadas da cadeia de caracteres formatada e, em seguida, gera a posição da remoção e as informações descritivas.Removes the assigned characters between the specified positions from the formatted string, and then outputs the removal position and descriptive information.

RemoveAt(Int32)

Remove o caractere atribuído na posição especificada da cadeia de caracteres formatada.Removes the assigned character at the specified position from the formatted string.

public:
 bool RemoveAt(int position);
public bool RemoveAt (int position);
member this.RemoveAt : int -> bool
Public Function RemoveAt (position As Integer) As Boolean

Parâmetros

position
Int32

A posição baseada em zero do caractere atribuído a ser removido.The zero-based position of the assigned character to remove.

Retornos

Boolean

true se o caractere foi removido com êxito; caso contrário, false.true if the character was successfully removed; otherwise, false.

Comentários

O RemoveAt método não terá efeito se não houver nenhum caractere atribuído na posição de remoção especificada.The RemoveAt method has no effect if there are no assigned characters at the removal position specified. Os caracteres literais não são afetados por esse método.Literal characters are not affected by this method.

Quando um caractere é removido, os caracteres restantes em posição superior na máscara mudarão para a esquerda para preencher a lacuna criada pela remoção.When a character is removed, the remaining higher-positioned characters in the mask will shift to the left to fill in the gap created by the removal. As posições vagas são redefinidas para entrada.Vacated positions are reset for input. Se a movimentação dos caracteres for impedida pela definição de máscara, nenhuma remoção ocorrerá e RemoveAt retornará false .If movement of the characters is prevented by the mask definition, no removal occurs, and RemoveAt returns false.

Essa chamada de método é exatamente equivalente à seguinte chamada para a versão sobrecarregada RemoveAt(Int32, Int32) :This method call is exactly equivalent to the following call to the overloaded RemoveAt(Int32, Int32) version:

RemoveAt(pos, pos);

Confira também

Aplica-se a

RemoveAt(Int32, Int32)

Remove o caractere atribuído entre as posições especificadas da cadeia de caracteres formatada.Removes the assigned characters between the specified positions from the formatted string.

public:
 bool RemoveAt(int startPosition, int endPosition);
public bool RemoveAt (int startPosition, int endPosition);
member this.RemoveAt : int * int -> bool
Public Function RemoveAt (startPosition As Integer, endPosition As Integer) As Boolean

Parâmetros

startPosition
Int32

O índice baseado em zero do primeiro caractere atribuído a ser removido.The zero-based index of the first assigned character to remove.

endPosition
Int32

O índice baseado em zero do último caractere atribuído a ser removido.The zero-based index of the last assigned character to remove.

Retornos

Boolean

true se o caractere foi removido com êxito; caso contrário, false.true if the character was successfully removed; otherwise, false.

Comentários

O RemoveAt método não terá efeito se não houver nenhum caractere atribuído nas posições de remoção especificadas.The RemoveAt method has no effect if there are no assigned characters at the removal positions specified.

Quando um caractere é removido, os caracteres restantes em posição superior na máscara mudarão para a esquerda para preencher a lacuna criada pela remoção.When a character is removed, the remaining higher-positioned characters in the mask will shift to the left to fill in the gap created by the removal. As posições vagas são redefinidas para entrada.Vacated positions are reset for input. Se a movimentação dos caracteres for impedida pela definição de máscara, nenhuma remoção ocorrerá e RemoveAt retornará false .If movement of the characters is prevented by the mask definition, no removal occurs, and RemoveAt returns false.

Confira também

Aplica-se a

RemoveAt(Int32, Int32, Int32, MaskedTextResultHint)

Remove os caracteres atribuídos entre as posições especificadas da cadeia de caracteres formatada e, em seguida, gera a posição da remoção e as informações descritivas.Removes the assigned characters between the specified positions from the formatted string, and then outputs the removal position and descriptive information.

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

Parâmetros

startPosition
Int32

O índice baseado em zero do primeiro caractere atribuído a ser removido.The zero-based index of the first assigned character to remove.

endPosition
Int32

O índice baseado em zero do último caractere atribuído a ser removido.The zero-based index of the last assigned character to remove.

testPosition
Int32

Se tiver êxito, a posição baseada em zero na cadeia de caracteres formatada em que os caracteres foram realmente removidos; caso contrário, a primeira posição em que a operação falhou.If successful, the zero-based position in the formatted string of where the characters were actually removed; otherwise, the first position where the operation failed. Um parâmetro de saída.An output parameter.

resultHint
MaskedTextResultHint

Um MaskedTextResultHint que descreve sucintamente o resultado da operação.A MaskedTextResultHint that succinctly describes the result of the operation. Um parâmetro de saída.An output parameter.

Retornos

Boolean

true se o caractere foi removido com êxito; caso contrário, false.true if the character was successfully removed; otherwise, false.

Comentários

O RemoveAt método não terá efeito se não houver nenhum caractere atribuído nas posições de remoção especificadas.The RemoveAt method has no effect if there are no assigned characters at the removal positions specified.

Quando um caractere é removido, os caracteres restantes em posição superior na máscara mudarão para a esquerda para preencher a lacuna criada pela remoção.When a character is removed, the remaining higher-positioned characters in the mask will shift to the left to fill in the gap created by the removal. As posições vagas são redefinidas para entrada.Vacated positions are reset for input. Se a movimentação dos caracteres for impedida pela definição de máscara, nenhuma remoção ocorrerá e RemoveAt retornará false .If movement of the characters is prevented by the mask definition, no removal occurs, and RemoveAt returns false.

Esta versão do RemoveAt fornece dois parâmetros de saída adicionais para transmitir mais informações sobre a operação do método.This version of RemoveAt provides two additional output parameters to convey more information about the operation of the method.

Confira também

Aplica-se a