System.ComponentModel.MaskedTextProvider.RemoveAt C# (CSharp) Méthode

RemoveAt() public méthode

Removes all characters in edit position from in the test string at the specified start and end positions and shifts any remaining characters left. (Remove characters from the virtual string). Returns true on success, false otherwise.
public RemoveAt ( int startPosition, int endPosition ) : bool
startPosition int
endPosition int
Résultat bool
        public bool RemoveAt(int startPosition, int endPosition)
        {
            int dummyVar;
            MaskedTextResultHint dummyVar2;
            return RemoveAt(startPosition, endPosition, out dummyVar, out dummyVar2);
        }

Same methods

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

Usage Example

        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