|
CollectionExtensionsMergeT, TKey, TValue(T, Boolean, IDictionaryTKey, TValue) Method
|
Merges elements of multiple dictionaries into a single dictionary.
Namespace: GSF.CollectionsAssembly: GSF.Core (in GSF.Core.dll) Version: 2.4.207-beta+1781b796b2aa7a54013a031eb432fe4ccee31867
Syntax public static T Merge<T, TKey, TValue>(
this T source,
bool overwriteExisting,
params IDictionary<TKey, TValue>[] others
)
where T : new(), Object, IDictionary<TKey, TValue>
JavaScript does not support generic types or methods.
View SourceParameters
- source T
- Source dictionary to merge with another dictionary.
- overwriteExisting Boolean
- Set to true to overwrite duplicate key values as they are encountered.
- others IDictionaryTKey, TValue
- Other dictionaries to merge with source dictionary.
Type Parameters
- T
- Type of IDictionaryTKey, TValue to merge.
- TKey
- Type of IDictionaryTKey, TValue keys.
- TValue
- Type of IDictionaryTKey, TValue values.
Return Value
TA merged collection of all unique dictionary elements, all
others merged left to the source.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
T. 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