Share via


TextSpanHelper.Intersects(TextSpan, TextSpan) Method

Definition

Determines whether the first span intersects the second span.

public:
 static bool Intersects(Microsoft::VisualStudio::TextManager::Interop::TextSpan span1, Microsoft::VisualStudio::TextManager::Interop::TextSpan span2);
public:
 static bool Intersects(Microsoft::VisualStudio::TextManager::Interop::TextSpan span1, Microsoft::VisualStudio::TextManager::Interop::TextSpan span2);
 static bool Intersects(Microsoft::VisualStudio::TextManager::Interop::TextSpan span1, Microsoft::VisualStudio::TextManager::Interop::TextSpan span2);
public static bool Intersects (Microsoft.VisualStudio.TextManager.Interop.TextSpan span1, Microsoft.VisualStudio.TextManager.Interop.TextSpan span2);
static member Intersects : Microsoft.VisualStudio.TextManager.Interop.TextSpan * Microsoft.VisualStudio.TextManager.Interop.TextSpan -> bool
Public Shared Function Intersects (span1 As TextSpan, span2 As TextSpan) As Boolean

Parameters

span1
TextSpan

[in] The first TextSpan object.

span2
TextSpan

[in] The second TextSpan object.

Returns

Returns true if the start of span1 is less than the end of span2 and the end of span1 is greater than the start of span2; otherwise, returns false. Notice that the spans do not intersect if one span ends exactly where the other begins.

Remarks

This method returns true if calls to the StartsBeforeEndOf and EndsAfterStartOf methods both return true.

Applies to