• Each addition to the dictionary consists of a value and its associated key
• Dictionary class is implemented as a HashTable
• Key must be unique
• Initial capacity of a dictionary is 3, reallocation happens as new elements are added
• Declaration: Dictionary
• ContainsKey: myDict.ContainsKey(“keyHere”);
• Loop Contents:
foreach(KeyValuePair
{
Console.WriteLine(kvp.Key, kvp.Value);
}
No comments:
Post a Comment