Tutorial by Examples: containskey

To check if a Dictionary has an specifique key, you can call the method ContainsKey(TKey) and provide the key of TKey type. The method returns a bool value when the key exists on the dictionary. For sample: var dictionary = new Dictionary<string, Customer>() { {"F1", new Custom...

Page 1 of 1