|
WeightedCollectionT Constructor (Int32, IEqualityComparerT, IEnumerableT) |
Constructor which will initialize the pool with an array of T with enough capacity and compare by comparer.
Namespace: JLChnToZ.LuckyPlayer.WeightedRandomizerAssembly: LuckyPlayer (in LuckyPlayer.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax public WeightedCollection(
int capacity,
IEqualityComparer<T> comparer,
IEnumerable<T> source
)
Public Sub New (
capacity As Integer,
comparer As IEqualityComparer(Of T),
source As IEnumerable(Of T)
)
public:
WeightedCollection(
int capacity,
IEqualityComparer<T>^ comparer,
IEnumerable<T>^ source
)
new :
capacity : int *
comparer : IEqualityComparer<'T> *
source : IEnumerable<'T> -> WeightedCollection
Parameters
- capacity
- Type: SystemInt32
Initial capacity of the pool - comparer
- Type: System.Collections.GenericIEqualityComparerT
Custom equality comparer for checking between two Ts are equal. - source
- Type: System.Collections.GenericIEnumerableT
Array of objects which will initially put into the pool.
See Also