ITextEdit::Delete Method (Int32, Int32)
Visual Studio 2015
Deletes a sequence of characters from the buffer.
Assembly: Microsoft.VisualStudio.Text.Data (in Microsoft.VisualStudio.Text.Data.dll)
Parameters
- startPosition
-
Type:
System::Int32
The position of the first character to delete.
- charsToDelete
-
Type:
System::Int32
The number of characters to delete.
Return Value
Type: System::Booleantrue if the deletion succeeded; false if it was prevented by a read-only region.
| Exception | Condition |
|---|---|
| InvalidOperationException | |
| ArgumentOutOfRangeException | startPosition is less than zero or greater than the length of the buffer, or charsToDelete is less than zero, or startPosition + charsToDelete is greater than the length of the buffer. |
Deleting zero characters will succeed, but will not generate a new snapshot or raise a Changed event.
Show: