Wintellect.PowerCollections Namespace
Algorithms Class
GhostDoc Pro Sample Help File

Bag<(Of <(<'T>)>)>..::..IsEqualTo Method

Determines if this bag is equal to another bag. This bag is equal to otherBag if they contain the same number of of copies of equal elements.

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

Syntax


public bool IsEqualTo(
	Bag<T> otherBag
)
Public Function IsEqualTo ( _
	otherBag As Bag(Of T) _
) As Boolean
public:
bool^ IsEqualTo(
	Bag<T>^ otherBag
)

Parameters

otherBag
Type: Wintellect.PowerCollections..::..Bag<(Of <(<'T>)>)>
Bag to compare to

Return Value

True if this bag is equal to otherBag, false otherwise.

Exceptions


ExceptionCondition
InvalidOperationExceptionThis bag and otherBag don't use the same method for comparing items.

Remarks


IsSupersetOf is computed in time O(N), where N is the number of unique items in this bag.