OrderedDictionaryTKey, TValue(IEnumerableKeyValuePairTKey, TValue, IEqualityComparerTKey) Constructor
Initializes a new instance of the
OrderedDictionaryTKey, TValue class that contains elements copied from the specified
[!:IEnumerable<KeyValuePair<TKey, TValue>>] and uses the specified
IEqualityComparerT.
Namespace: Gemstone.CollectionsAssembly: Gemstone.Common (in Gemstone.Common.dll) Version: 1.0.128 -- Release Build+d050cfc5563c89a1188cc3c6b2d417530856f490
public OrderedDictionary(
IEnumerable<KeyValuePair<TKey, TValue>> collection,
IEqualityComparer<TKey> comparer
)
Public Sub New (
collection As IEnumerable(Of KeyValuePair(Of TKey, TValue)),
comparer As IEqualityComparer(Of TKey)
)
public:
OrderedDictionary(
IEnumerable<KeyValuePair<TKey, TValue>>^ collection,
IEqualityComparer<TKey>^ comparer
)
Gemstone.Collections.OrderedDictionary = function(collection, comparer);
Parameters
- collection IEnumerableKeyValuePairTKey, TValue
- The [!:IEnumerable<KeyValuePair<TKey, TValue>>] whose elements are copied to the new OrderedDictionaryTKey, TValue.
- comparer IEqualityComparerTKey
- The IEqualityComparerT implementation to use when comparing keys, or null to use the default EqualityComparerT for the type of the key.
ArgumentNullException | collection is null. |
ArgumentException | collection contains one or more duplicate keys. |