Compartilhar via


SnapshotSpan.Intersection Method

Definition

Overloads

Intersection(SnapshotSpan)

Computes the intersection with the given SnapshotSpan, or null if there is no intersection.

Intersection(Span)

Computes the intersection with the given span, or null if there is no intersection.

Intersection(SnapshotSpan)

Computes the intersection with the given SnapshotSpan, or null if there is no intersection.

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

Parameters

snapshotSpan
SnapshotSpan

The span to check.

Returns

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

Exceptions

snapshotSpan does not refer to the same snapshot.

Remarks

Two spans intersect if they have positions in common, or if the end of one span coincides with the start of the other span, and neither is empty.

Applies to

Intersection(Span)

Computes the intersection with the given span, or null if there is no intersection.

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

Parameters

simpleSpan
Span

The span to check.

Returns

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

Remarks

Two spans intersect if they have positions in common, or if the end of one span coincides with the start of the other span, and neither is empty.

Applies to