Wintellect.PowerCollections Namespace
Algorithms Class
GhostDoc Pro Sample Help File

OrderedBag<(Of <(<'T>)>)> Constructor (IEnumerable<(Of <(<'T>)>)>, IComparer<(Of <(<'T>)>)>)

Creates a new OrderedBag. The Compare method of the passed comparison object will be used to compare items in this bag. The bag is initialized with all the items in the given collection.

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

Syntax


public OrderedBag(
	IEnumerable<T> collection,
	IComparer<T> comparer
)
Public Sub New ( _
	collection As IEnumerable(Of T), _
	comparer As IComparer(Of T) _
)
public:
OrderedBag(
	IEnumerable<T>^ collection, 
	IComparer<T>^ comparer
)

Parameters

collection
Type: IEnumerable<(Of <(<'T>)>)>
A collection with items to be placed into the OrderedBag.
comparer
Type: IComparer<(Of <(<'T>)>)>
An instance of IComparer<T> that will be used to compare items.

Remarks


The GetHashCode and Equals methods of the provided IComparer<T> will never be called, and need not be implemented.