System.ComponentModel.MaskedTextProvider.RemoveAt C# (CSharp) Method

RemoveAt() public method

Removes the character from the formatted string at the specified position and shifts characters left. True if character shifting is successful.
public RemoveAt ( int position ) : bool
position int
return bool
        public bool RemoveAt(int position)
        {
            return RemoveAt(position, position);
        }

Same methods

MaskedTextProvider::RemoveAt ( int startPosition, int endPosition ) : bool
MaskedTextProvider::RemoveAt ( int startPosition, int endPosition, int &testPosition, MaskedTextResultHint &resultHint ) : bool

Usage Example

Example #1
0
        private bool CanDelete( int startPosition, int selectionLength, bool deleteForward, MaskedTextProvider provider )
        {
            if( this.IsReadOnly )
            return false;

              if( selectionLength == 0 )
              {
            if( !deleteForward )
            {
              if( startPosition == 0 )
            return false;

              startPosition--;
            }
            else if( ( startPosition + selectionLength ) == provider.Length )
            {
              return false;
            }
              }

              MaskedTextResultHint notUsed;
              int tentativeCaretPosition = startPosition;

              int endPosition = ( selectionLength > 0 ) ? ( ( startPosition + selectionLength ) - 1 ) : startPosition;

              bool success = provider.RemoveAt( startPosition, endPosition, out tentativeCaretPosition, out notUsed );

              return success;
        }
All Usage Examples Of System.ComponentModel.MaskedTextProvider::RemoveAt