Compartir a través de


SnapshotSpan.Overlap Method

Definition

Overloads

Overlap(SnapshotSpan)

Returns the overlap with the given SnapshotSpan, or null if there is no overlap.

Overlap(Span)

Returns the overlap with the given span, or null if there is no overlap.

Overlap(SnapshotSpan)

Returns the overlap with the given SnapshotSpan, or null if there is no overlap.

public:
 Nullable<Microsoft::VisualStudio::Text::SnapshotSpan> Overlap(Microsoft::VisualStudio::Text::SnapshotSpan snapshotSpan);
public Microsoft.VisualStudio.Text.SnapshotSpan? Overlap (Microsoft.VisualStudio.Text.SnapshotSpan snapshotSpan);
member this.Overlap : Microsoft.VisualStudio.Text.SnapshotSpan -> Nullable<Microsoft.VisualStudio.Text.SnapshotSpan>
Public Function Overlap (snapshotSpan As SnapshotSpan) As Nullable(Of SnapshotSpan)

Parameters

snapshotSpan
SnapshotSpan

The span to check.

Returns

The overlap of the spans, or null if the overlap is empty.

Exceptions

snapshotSpan does not refer to the same ITextSnapshot as this snapshot span.

Remarks

Two spans overlap if they have positions in common and are not empty. Empty spans do not overlap with any other span.

Applies to

Overlap(Span)

Returns the overlap with the given span, or null if there is no overlap.

public:
 Nullable<Microsoft::VisualStudio::Text::SnapshotSpan> Overlap(Microsoft::VisualStudio::Text::Span simpleSpan);
public Microsoft.VisualStudio.Text.SnapshotSpan? Overlap (Microsoft.VisualStudio.Text.Span simpleSpan);
member this.Overlap : Microsoft.VisualStudio.Text.Span -> Nullable<Microsoft.VisualStudio.Text.SnapshotSpan>
Public Function Overlap (simpleSpan As Span) As Nullable(Of SnapshotSpan)

Parameters

simpleSpan
Span

The span to check.

Returns

The overlap of the spans, or null if the overlap is empty.

Remarks

Two spans overlap if they have positions in common and are not empty. Empty spans do not overlap with any other span.

Applies to