Compartir a través de


SnapshotSpan.Intersection Method (SnapshotSpan)

Calculates the intersection with the given SnapshotSpan.

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

Syntax

'Declaración
Public Function Intersection ( _
    snapshotSpan As SnapshotSpan _
) As Nullable(Of SnapshotSpan)
public Nullable<SnapshotSpan> Intersection(
    SnapshotSpan snapshotSpan
)
public:
Nullable<SnapshotSpan> Intersection(
    SnapshotSpan snapshotSpan
)
member Intersection : 
        snapshotSpan:SnapshotSpan -> Nullable<SnapshotSpan> 
public function Intersection(
    snapshotSpan : SnapshotSpan
) : Nullable<SnapshotSpan>

Parameters

Return Value

Type: System.Nullable<SnapshotSpan>
The intersection of the spans, or nulla null reference (Nothing in Visual Basic) if they do not intersect.

Exceptions

Exception Condition
ArgumentException

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.

.NET Framework Security

See Also

Reference

SnapshotSpan Structure

Intersection Overload

Microsoft.VisualStudio.Text Namespace