TextSpanHelper.Intersects(TextSpan, TextSpan) 方法

定义

确定第一个跨距是否与第二个跨度相交。

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

参数

span1
TextSpan

中第一个 TextSpan 对象。

span2
TextSpan

中第二个 TextSpan 对象。

返回

Boolean

true如果的开头小于的 span1 末尾,则返回 span2 span1 span2 ; 否则返回。否则,返回 false 。 请注意,如果一个跨度的结束时间与另一个范围的开始位置完全相同,则跨距不相交。

注解

true如果对 StartsBeforeEndOf 和方法的调用 EndsAfterStartOf 都返回,则此方法返回 true

适用于