Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

IHash<TKey, TValue> Interface

Defines the interface of the STL/CLR hash_map, hash_multimap, hash_set, and hash_multiset objects.

Namespace:  Microsoft.VisualC.StlClr
Assembly:  Microsoft.VisualC.STLCLR (in Microsoft.VisualC.STLCLR.dll)
public interface IHash<TKey, TValue> : IBidirectionalContainer<TValue>, 
	ICloneable, ICollection, IEnumerable

Type Parameters

TKey

The type of the key component of an element in the controlled sequence.

TValue

The type of the value component of an element in the controlled sequence.

The IHash<TKey, TValue> type exposes the following members.

  NameDescription
Public propertyCountGets the number of elements contained in the ICollection. (Inherited from ICollection.)
Public propertyIsSynchronizedGets a value indicating whether access to the ICollection is synchronized (thread safe). (Inherited from ICollection.)
Public propertySyncRootGets an object that can be used to synchronize access to the ICollection. (Inherited from ICollection.)
Top
  NameDescription
Public methodbeginDesignates the beginning of the controlled sequence.
Public methodbucket_countCounts the number of buckets in the hash table.
Public methodclearRemoves all elements from the container.
Public methodCloneCreates a new object that is a copy of the current instance. (Inherited from ICloneable.)
Public methodCopyToCopies the elements of the ICollection to an Array, starting at a particular Array index. (Inherited from ICollection.)
Public methodcountFinds the number of elements that match a specified key.
Public methodemptyTests whether no elements are present in the container.
Public methodendDesignates the end of the controlled sequence.
Public methodequal_rangeFinds the range that matches a specified key.
Public methoderase(TKey)Removes elements from the container that match the specified key.
Public methoderase(ContainerBidirectionalIterator<TValue>, ContainerBidirectionalIterator<TValue>)Removes from the container the element that is specified by the given iterator.
Public methoderase(ContainerBidirectionalIterator<TValue>, ContainerBidirectionalIterator<TValue>, ContainerBidirectionalIterator<TValue>)Removes from the container the elements between the specified iterators.
Public methodfindFinds an element that matches a specified key.
Public methodget_generationGets the current change generation of the underlying container. (Inherited from IBidirectionalContainer<TValue>.)
Public methodGetEnumeratorReturns an enumerator that iterates through a collection. (Inherited from IEnumerable.)
Public methodhash_delegateReturns the delegate that is used to convert a key value to an integer.
Public methodinsert(IEnumerable)Adds the given enumeration to the container.
Public methodinsert(GenericPair<ContainerBidirectionalIterator<TValue>, Boolean>, TValue)Adds the given value to the container.
Public methodinsert(IInputIterator<TValue>, IInputIterator<TValue>)Adds to the container the elements specified by the given iterators.
Public methodinsert(ContainerBidirectionalIterator<TValue>, ContainerBidirectionalIterator<TValue>, TValue)Adds the given element to the container.
Public methodkey_compReturns the ordering delegate that is used to order the controlled sequence. You use it to compare two keys.
Public methodload_factorCounts the average number of elements per bucket in the hash table.
Public methodlower_boundFinds the beginning of the range of elements that match a specified key.
Public methodmax_load_factor()Gets the maximum number of elements per bucket in the hash table.
Public methodmax_load_factor(Single)Sets the maximum number of elements per bucket in the hash table.
Public methodrbeginDesignates the beginning of the reversed controlled sequence.
Public methodrehashRebuilds the hash table.
Public methodrendDesignates the end of the reversed controlled sequence.
Public methodsizeCounts the number of elements in the container.
Public methodswapSwaps the contents of two containers.
Public methodupper_boundFinds the end of the range of elements that match a specified key.
Public methodvalue_compReturns the ordering delegate that is used to order the controlled sequence.
Top
  NameDescription
Public Extension MethodAsParallelEnables parallelization of a query. (Defined by ParallelEnumerable.)
Public Extension MethodAsQueryableConverts an IEnumerable to an IQueryable. (Defined by Queryable.)
Public Extension MethodCast<TResult>Casts the elements of an IEnumerable to the specified type. (Defined by Enumerable.)
Public Extension MethodOfType<TResult>Filters the elements of an IEnumerable based on a specified type. (Defined by Enumerable.)
Top

Some methods, especially operators, declare a type for a parameter but do not specify a parameter name. Such a parameter is known as an unnamed parameter. In the documentation for these methods, the __unnamed0 placeholder represents the unnamed parameter.

For more information, see hash_map (STL/CLR), hash_multimap (STL/CLR), hash_set (STL/CLR), and hash_multiset (STL/CLR).

.NET Framework

Supported in: 4.5.1, 4.5, 4, 3.5

Windows Phone 8.1, Windows Phone 8, Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.