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)
Syntax
'Declaration
Public Function Overlap ( _
snapshotSpan As SnapshotSpan _
) As Nullable(Of SnapshotSpan)
public Nullable<SnapshotSpan> Overlap(
SnapshotSpan snapshotSpan
)
public:
Nullable<SnapshotSpan> Overlap(
SnapshotSpan snapshotSpan
)
member Overlap :
snapshotSpan:SnapshotSpan -> Nullable<SnapshotSpan>
public function Overlap(
snapshotSpan : SnapshotSpan
) : Nullable<SnapshotSpan>
Parameters
snapshotSpan
Type: Microsoft.VisualStudio.Text.SnapshotSpanThe span to check.
Return Value
Type: System.Nullable<SnapshotSpan>
The overlap of the spans, or nulla null reference (Nothing in Visual Basic) if they do not overlap.
Exceptions
Exception | Condition |
---|---|
ArgumentException | 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.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.