AllowNullDictionaryTKey, TValue(IEnumerableKeyValuePairTKey, TValue, IEqualityComparerTKey) Constructor

Initializes a new instance of the AllowNullDictionaryTKey, TValue class with the specified collection.

Definition

Namespace: KGySoft.Collections
Assembly: KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 10.0.0
C#
public AllowNullDictionary(
	IEnumerable<KeyValuePair<TKey, TValue>> collection,
	IEqualityComparer<TKey>? comparer = null
)

Parameters

collection  IEnumerableKeyValuePairTKey, TValue
comparer  IEqualityComparerTKey  (Optional)
The IEqualityComparerT implementation to use when comparing keys. This parameter is optional.
Default value: .

Exceptions

ArgumentNullExceptioncollection is .
ArgumentExceptioncollection contains one or more duplicate keys.

See Also