C# Dictionary class is a generic collection of a (key, value) pair. Dictionary<TKey,TValue> class and its methods can be used to add, update, find and remove elements from the collection. Dictionary.Remove() and Dictionary.Clear() methods are used to remove elements of the collection. The Remove method removes elements matching with the key passed in the Remove method. The Clear method removes all elements from the dictionary.