SnapshotSpan::Overlap Method (SnapshotSpan)

 

Gets the overlap with the given SnapshotSpan.

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

public:
Nullable<SnapshotSpan> Overlap(
	SnapshotSpan snapshotSpan
)

Parameters

snapshotSpan
Type: Microsoft.VisualStudio.Text::SnapshotSpan

The span to check.

Return Value

Type: System::Nullable<SnapshotSpan>

The overlap of the spans, or null if they do not overlap.

Exception Condition
ArgumentException

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

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

Return to top
Show: