NormalizedSpanCollection::Difference Method (NormalizedSpanCollection^, NormalizedSpanCollection^)

 

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)

public:
static NormalizedSpanCollection^ Difference(
	NormalizedSpanCollection^ left,
	NormalizedSpanCollection^ right
)

Parameters

left
Type: Microsoft.VisualStudio.Text::NormalizedSpanCollection^

The first span set.

right
Type: Microsoft.VisualStudio.Text::NormalizedSpanCollection^

The second span set.

Return Value

Type: Microsoft.VisualStudio.Text::NormalizedSpanCollection^

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

Exception Condition
ArgumentNullException

left or right is null.

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.

Return to top
Show: