Udostępnij za pośrednictwem


IProjectionBufferBase.Delete(Span) Method

Definition

Deletes a span of characters from the buffer.

public:
 Microsoft::VisualStudio::Text::Projection::IProjectionSnapshot ^ Delete(Microsoft::VisualStudio::Text::Span deleteSpan);
public:
 Microsoft::VisualStudio::Text::Projection::IProjectionSnapshot ^ Delete(Microsoft::VisualStudio::Text::Span deleteSpan);
Microsoft::VisualStudio::Text::Projection::IProjectionSnapshot Delete(Microsoft::VisualStudio::Text::Span deleteSpan);
public Microsoft.VisualStudio.Text.Projection.IProjectionSnapshot Delete (Microsoft.VisualStudio.Text.Span deleteSpan);
abstract member Delete : Microsoft.VisualStudio.Text.Span -> Microsoft.VisualStudio.Text.Projection.IProjectionSnapshot
Public Function Delete (deleteSpan As Span) As IProjectionSnapshot

Parameters

deleteSpan
Span

The span of characters to delete.

Returns

An IProjectionSnapshot.

Exceptions

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

A TextEdit 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.

Applies to