RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TDictionary.Create Constructor (IEqualityComparer<TKey>)

Create dictionary.

Pascal
constructor Create(ACapacity: Integer = 0); overload;
constructor Create(const AComparer: IEqualityComparer<TKey>); overload;
constructor Create(ACapacity: Integer; const AComparer: IEqualityComparer<TKey>); overload;
constructor Create(Collection: TEnumerable<TPair<TKey,TValue>>); overload;
constructor Create(Collection: TEnumerable<TPair<TKey,TValue>>; const AComparer: IEqualityComparer<TKey>); overload;
C++
__fastcall TDictionary(int ACapacity = 0);
__fastcall TDictionary(const IEqualityComparer<TKey> AComparer);
__fastcall TDictionary(int ACapacity, const IEqualityComparer<TKey> AComparer);
__fastcall TDictionary(TEnumerable<TPair<TKey,TValue>> Collection);
__fastcall TDictionary(TEnumerable<TPair<TKey,TValue>> Collection, const IEqualityComparer<TKey> AComparer);

This overloaded method creates and initializes a dictionary instance. Various combinations of parameters may be used to specify the initial capacity ACapacity, an equality comparison function AComparer, or an initial collection of key-value items Collection

 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!