class Dictionary<TKey,TValue>

in global :: System . Collections . Generic

Represents a collection of keys and values.

  • TKey The type of the keys in the dictionary.
  • TValue The type of the values in the dictionary.

public Dictionary<TKey,TValue>( int capacity )

Initializes a new instance of the class that is empty, has the specified initial capacity, and uses the default equality comparer for the key type.

  • capacity The initial number of elements that the can contain.

public IEqualityComparer<TKey> Comparer { get; }

Gets the that is used to determine equality of keys for the dictionary.

  • Returns The generic interface implementation that is used to determine equality of keys for the current and to provide hash values for the keys.

public int Count { get; }

Gets the number of key/value pairs contained in the .

  • Returns The number of key/value pairs contained in the .

public int EnsureCapacity( int capacity )

Ensures that the dictionary can hold up to a specified number of entries without any further expansion of its backing storage.

  • capacity The number of entries.
  • Returns The current capacity of the .

public void GetObjectData( SerializationInfo info, StreamingContext context )

Implements the interface and returns the data needed to serialize the instance.

  • info A object that contains the information required to serialize the instance.
  • context A structure that contains the source and destination of the serialized stream associated with the instance.

public Dictionary<TKey,TValue>.KeyCollection Keys { get; }

Gets a collection containing the keys in the .

  • Returns A containing the keys in the .

public void OnDeserialization( object sender )

Implements the interface and raises the deserialization event when the deserialization is complete.

  • sender The source of the deserialization event.

public void TrimExcess( int capacity )

Sets the capacity of this dictionary to hold up a specified number of entries without any further expansion of its backing storage.

  • capacity The new capacity.

public Dictionary<TKey,TValue>.ValueCollection Values { get; }

Gets a collection containing the values in the .

  • Returns A containing the values in the .

public Dictionary<TKey,TValue>( IDictionary<TKey,TValue> dictionary )

😔 No documentation found.

public Dictionary<TKey,TValue>( int capacity, IEqualityComparer<TKey> comparer )

😔 No documentation found.

public Dictionary<TKey,TValue>( IEqualityComparer<TKey> comparer )

😔 No documentation found.

public Dictionary<TKey,TValue>( IDictionary<TKey,TValue> dictionary, IEqualityComparer<TKey> comparer )

😔 No documentation found.

public void TrimExcess( )

😔 No documentation found.

public int GetHashCode( )

😔 No documentation found.

public bool Equals( object obj )

😔 No documentation found.

public string ToString( )

😔 No documentation found.

public Type GetType( )

😔 No documentation found.

public Dictionary<TKey,TValue>( )

😔 No documentation found.

public Dictionary<TKey,TValue>( IEnumerable<KeyValuePair<TKey,TValue>> collection, IEqualityComparer<TKey> comparer )

😔 No documentation found.

public bool TryGetValue( TKey key, ref TValue value )

😔 No documentation found.

public Dictionary<TKey,TValue>( IEnumerable<KeyValuePair<TKey,TValue>> collection )

😔 No documentation found.

public bool Remove( TKey key )

😔 No documentation found.

public bool TryGetAlternateLookup( ref Dictionary<TKey,TValue>.AlternateLookup<TAlternateKey> lookup )

😔 No documentation found.

public Dictionary<TKey,TValue>.AlternateLookup<TAlternateKey> GetAlternateLookup( )

😔 No documentation found.

public Dictionary<TKey,TValue>.Enumerator GetEnumerator( )

😔 No documentation found.

public bool ContainsValue( TValue value )

😔 No documentation found.

public bool ContainsKey( TKey key )

😔 No documentation found.

public void Clear( )

😔 No documentation found.

public void Add( TKey key, TValue value )

😔 No documentation found.

public TValue Item { get; set; }

😔 No documentation found.

public int Capacity { get; }

😔 No documentation found.

public bool TryAdd( TKey key, TValue value )

😔 No documentation found.

public bool Remove( TKey key, ref TValue value )

😔 No documentation found.