 | ContainerHelperIntersectK, V Method (DictionaryK, V, DictionaryK, V) |
Creates a new dictionary containing all key/value pairs from
a whose keys are also contained in b.
If both dictionaries contain one key, the value from a takes precedence, in contrast to union.
Namespace:
de.unika.ipd.grGen.libGr
Assembly:
libGr (in libGr.dll) Version: GrGen.NET 7.2
Syntaxpublic static Dictionary<K, V> Intersect<K, V>(
Dictionary<K, V> a,
Dictionary<K, V> b
)
Parameters
- a
- Type: System.Collections.GenericDictionaryK, V
A dictionary. - b
- Type: System.Collections.GenericDictionaryK, V
Another dictionary of compatible type to a.
Type Parameters
- K
- V
Return Value
Type:
DictionaryK,
VA new dictionary containing all elements from
a,
which are also in
b.
See Also