LogIn
I don't have account.

Dictionary Properties and Methods in c#

DevSniper
134 Views

Dictionary Properties

1. Count :- Retrieves the number of key/value pairs contained in the Dictionary.

2. Keys :- Retrieves a collection with the Dictionary's keys in it.

3. Values :- Retrieves a collection with the Dictionary's values in it.

4. Item[TKey] :- Gets or sets the value linked with the specified key.

5. Comparer :- Gets the IEqualityComparer<T> that is used to determine equality of keys for the dictionary.

Dictionary Methods

Add(TKey, TValue)

ContainsKey(TKey)

ContainsValue(TValue)

Clear()

EnsureCapacity(Int32)

Equals(Object)

GetEnumerator()

GetHashCode()

GetType()

MemberwiseClone()

OnDeserialization(Object)

Remove(TKey)

Remove(TKey, TValue)

ToString()

TrimExcess()

TrimExcess(Int32)

TryAdd(TKey, TValue)

TryGetValue(TKey, TValue)