Click or drag to resize
DictionaryExtensionMethodsAddRangeTKey, TValue Method
Adds the range specified to the dictionary specified, using the key producer func to produce the key values. If the key already exists, the key's value is overwritten with the value to add.

Namespace: SD.Tools.BCLExtensions.CollectionsRelated
Assembly: SD.Tools.BCLExtensions (in SD.Tools.BCLExtensions.dll) Version: 1.0.0.0 (1.0.10.1127)
Syntax
public static void AddRange<TKey, TValue>(
	this Dictionary<TKey, TValue> container,
	Func<TValue, TKey> keyProducerFunc,
	IEnumerable<TValue> rangeToAdd
)

Parameters

container
Type: System.Collections.GenericDictionaryTKey, TValue
The container.
keyProducerFunc
Type: SystemFuncTValue, TKey
The key producer func.
rangeToAdd
Type: System.Collections.GenericIEnumerableTValue
The range to add.

Type Parameters

TKey
The type of the key.
TValue
The type of the value.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type DictionaryTKey, TValue. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also