Delen via


NormalizedSpanCollection.Difference Method

Finds the difference between two sets. The difference is defined as everything in the first span set that is not in the second span set.

Namespace:  Microsoft.VisualStudio.Text
Assembly:  Microsoft.VisualStudio.Text.Data (in Microsoft.VisualStudio.Text.Data.dll)

Syntax

'Declaration
Public Shared Function Difference ( _
    left As NormalizedSpanCollection, _
    right As NormalizedSpanCollection _
) As NormalizedSpanCollection
public static NormalizedSpanCollection Difference(
    NormalizedSpanCollection left,
    NormalizedSpanCollection right
)
public:
static NormalizedSpanCollection^ Difference(
    NormalizedSpanCollection^ left, 
    NormalizedSpanCollection^ right
)
static member Difference : 
        left:NormalizedSpanCollection * 
        right:NormalizedSpanCollection -> NormalizedSpanCollection
public static function Difference(
    left : NormalizedSpanCollection, 
    right : NormalizedSpanCollection
) : NormalizedSpanCollection

Parameters

Return Value

Type: Microsoft.VisualStudio.Text.NormalizedSpanCollection
The new span set that corresponds to the difference between left and right.

Exceptions

Exception Condition
ArgumentNullException

left or right is nulla null reference (Nothing in Visual Basic).

Remarks

Empty spans in the second set do not affect the first set at all. This method returns empty spans in the first set that are not contained by any set in the second set.

.NET Framework Security

See Also

Reference

NormalizedSpanCollection Class

Microsoft.VisualStudio.Text Namespace