-
The following code returns the number of key-value pairs.
myCount = myDictionary.Count
-
The following code returns a collection of all dictionary keys.
myKeys = myDictionary.Keys
-
The following code returns a collection of all dictionary values.
myValues = myDictionary.Values
-
The following code removes all key-value pairs from the dictionary.
Clear()
-
The following code checks if dictionary contains value 2345 and returns true/false.
ContainsValue(2345)
-
The following code tries to get value of key "V12" and returns true/false.
TryGetValue("V12", value)
-
The following code tries to add the key-value pair "V13" : 3456 and returns true/false.
TryAdd("V13", 3456)