Condividi tramite


NormalizedSpanCollection.Difference Method

Definition

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.

public:
 static Microsoft::VisualStudio::Text::NormalizedSpanCollection ^ Difference(Microsoft::VisualStudio::Text::NormalizedSpanCollection ^ left, Microsoft::VisualStudio::Text::NormalizedSpanCollection ^ right);
public static Microsoft.VisualStudio.Text.NormalizedSpanCollection Difference (Microsoft.VisualStudio.Text.NormalizedSpanCollection left, Microsoft.VisualStudio.Text.NormalizedSpanCollection right);
static member Difference : Microsoft.VisualStudio.Text.NormalizedSpanCollection * Microsoft.VisualStudio.Text.NormalizedSpanCollection -> Microsoft.VisualStudio.Text.NormalizedSpanCollection
Public Shared Function Difference (left As NormalizedSpanCollection, right As NormalizedSpanCollection) As NormalizedSpanCollection

Parameters

left
NormalizedSpanCollection

The first span set.

right
NormalizedSpanCollection

The second span set.

Returns

The new span set that corresponds to the difference between left and right.

Exceptions

right is null.

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.

Applies to