Click or drag to resize

RankedBagT Constructor (IEnumerableT, IComparerT)

Initializes a new bag instance that contains items copied from the supplied collection.

Namespace:  Kaos.Collections
Assembly:  KaosCollections (in KaosCollections.dll) Version: 4.2.0.0
Syntax
C#
public RankedBag(
	IEnumerable<T> collection,
	IComparer<T> comparer
)

Parameters

collection
Type: System.Collections.GenericIEnumerableT
The enumerable collection to be copied.
comparer
Type: System.Collections.GenericIComparerT
The comparer to use for item sorting.
Exceptions
ExceptionCondition
ArgumentNullExceptionWhen collection is null.
InvalidOperationExceptionWhen comparer is null and no other comparer available.
Remarks
This constructor is a O(n log n) operation, where n is the size of collection.
See Also