TextSpanHelper::Merge Method (TextSpan, TextSpan)

 

Merges the two given spans to create a new span.

Namespace:   Microsoft.VisualStudio.Package
Assembly:  Microsoft.VisualStudio.Package.LanguageService.14.0 (in Microsoft.VisualStudio.Package.LanguageService.14.0.dll)

public:
static TextSpan Merge(
	TextSpan span1,
	TextSpan span2
)

Parameters

span1
Type: Microsoft.VisualStudio.TextManager.Interop::TextSpan

[in] The first TextSpan object to be merged.

span2
Type: Microsoft.VisualStudio.TextManager.Interop::TextSpan

[in] The second TextSpan object to be merged.

Return Value

Type: Microsoft.VisualStudio.TextManager.Interop::TextSpan

Returns a TextSpan object that is the result of merging span1 and span2.

The result of the merge is a new span that has the lowest start point of span1 and span2 and the highest end point of span1 and span2.

Return to top
Show: