Share via


TextSpanHelper.Merge Method

Merges the two given spans to create a new span.

Namespace:  Microsoft.VisualStudio.Package
Assemblies:   Microsoft.VisualStudio.Package.LanguageService.11.0 (in Microsoft.VisualStudio.Package.LanguageService.11.0.dll)
  Microsoft.VisualStudio.Package.LanguageService (in Microsoft.VisualStudio.Package.LanguageService.dll)
  Microsoft.VisualStudio.Package.LanguageService.9.0 (in Microsoft.VisualStudio.Package.LanguageService.9.0.dll)
  Microsoft.VisualStudio.Package.LanguageService.10.0 (in Microsoft.VisualStudio.Package.LanguageService.10.0.dll)

Syntax

'Declaration
Public Shared Function Merge ( _
    span1 As TextSpan, _
    span2 As TextSpan _
) As TextSpan
public static TextSpan Merge(
    TextSpan span1,
    TextSpan span2
)
public:
static TextSpan Merge(
    TextSpan span1, 
    TextSpan span2
)
static member Merge : 
        span1:TextSpan * 
        span2:TextSpan -> TextSpan
public static function Merge(
    span1 : TextSpan, 
    span2 : TextSpan
) : TextSpan

Parameters

Return Value

Type: Microsoft.VisualStudio.TextManager.Interop.TextSpan
Returns a TextSpan object that is the result of merging span1 and span2.

Remarks

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.

.NET Framework Security

See Also

Reference

TextSpanHelper Class

Microsoft.VisualStudio.Package Namespace