Wintellect.PowerCollections Namespace
Algorithms Class
GhostDoc Pro Sample Help File

Set<(Of <(<'T>)>)>..::..SymmetricDifference Method

Computes the symmetric difference of this set with another set. The symmetric difference of two sets is all items that appear in either of the sets, but not both. A new set is created with the symmetric difference of the sets and is returned. This set and the other set are unchanged.

Namespace:  Wintellect.PowerCollections
Assembly:  PowerCollections (in PowerCollections.dll)

Syntax


public Set<T> SymmetricDifference(
	Set<T> otherSet
)
Public Function SymmetricDifference ( _
	otherSet As Set(Of T) _
) As Set(Of T)
public:
Set<T>^ SymmetricDifference(
	Set<T>^ otherSet
)

Parameters

otherSet
Type: Wintellect.PowerCollections..::..Set<(Of <(<'T>)>)>
Set to symmetric difference with.

Return Value

The symmetric difference of the two sets.

Exceptions


ExceptionCondition
InvalidOperationExceptionThis set and otherSet don't use the same method for comparing items.

Remarks


The symmetric difference of two sets is computed in time O(N), where N is the size of the smaller set.