Partilhar via


TextRange.Overlap(TextRange) Method

Definition

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

public Microsoft.VisualStudio.Extensibility.Editor.TextRange? Overlap (Microsoft.VisualStudio.Extensibility.Editor.TextRange range);
member this.Overlap : Microsoft.VisualStudio.Extensibility.Editor.TextRange -> Nullable<Microsoft.VisualStudio.Extensibility.Editor.TextRange>
Public Function Overlap (range As TextRange) As Nullable(Of TextRange)

Parameters

range
TextRange

The range to check.

Returns

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

Exceptions

range does not refer to the same ITextDocumentSnapshot as this snapshot range.

Applies to