Dictionary<K,V>
Key-value pairs.
Syntax
var m = new Dictionary<string,string>{...}; m["k"]Description
Holds key-value pairs; values are accessed by their keys. New keys are added with m["k"]=v, and Count gives the number of elements.
Example
Loading editor…
Expected output
Alex 2
When to use?
Holding the properties of an object; counting/grouping.