Поделиться через


ITextEdit.Delete Method (Span)

Deletes a sequence of characters from the buffer.

Namespace:  Microsoft.VisualStudio.Text
Assembly:  Microsoft.VisualStudio.Text.Data (in Microsoft.VisualStudio.Text.Data.dll)

Syntax

'Декларация
Function Delete ( _
    deleteSpan As Span _
) As Boolean
bool Delete(
    Span deleteSpan
)
bool Delete(
    Span deleteSpan
)
abstract Delete : 
        deleteSpan:Span -> bool 
function Delete(
    deleteSpan : Span
) : boolean

Parameters

Return Value

Type: System.Boolean
true if the deletion succeeded, false if it was prevented by a read-only region.

Exceptions

Exception Condition
InvalidOperationException

The Apply or Cancel or Dispose method has previously been called on this object.

ArgumentOutOfRangeException

deleteSpan.End is greater than the length of the buffer.

Remarks

Deleting an empty span will succeed, but will not generate a new snapshot or raise a Changed event.

.NET Framework Security

See Also

Reference

ITextEdit Interface

Delete Overload

Microsoft.VisualStudio.Text Namespace