IProjectionBufferBase.Delete Method

Deletes a span of characters from the buffer.

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

Syntax

'Declaration
Function Delete ( _
    deleteSpan As Span _
) As IProjectionSnapshot
IProjectionSnapshot Delete(
    Span deleteSpan
)
IProjectionSnapshot^ Delete(
    Span deleteSpan
)
abstract Delete : 
        deleteSpan:Span -> IProjectionSnapshot 
function Delete(
    deleteSpan : Span
) : IProjectionSnapshot

Parameters

Return Value

Type: Microsoft.VisualStudio.Text.Projection.IProjectionSnapshot
An IProjectionSnapshot.

Exceptions

Exception Condition
ArgumentOutOfRangeException

deleteSpan.The end of the span is greater than the length of the buffer.

InvalidOperationException

A ITextEdit is currently active.

Remarks

This is a shortcut for creating a new ITextEdit object, using it to delete the text, and then applying it. If the deletion fails on account of a read-only region, the snapshot returned will be the same as the current snapshot of the buffer before the attempted deletion.

.NET Framework Security

See Also

Reference

IProjectionBufferBase Interface

Microsoft.VisualStudio.Text.Projection Namespace