System::Collections::ObjectModel::KeyedCollection class

KeyedCollection class

Abstract collection of elements with embedded keys. Objects of this class should only be allocated using System::MakeObject() function. Never create instance of this type on stack or using operator new, as it will result in runtime errors and/or assertion faults. Always wrap this class into System::SmartPtr pointer and use this pointer to pass it to functions as argument.

template<typename TKey,typename TItem>class KeyedCollection : public System::Collections::ObjectModel::Collection<TItem>
ParameterDescription
TKeyKey type.
TItemvalue type.

Methods

MethodDescription
Add(const TItem&) overrideAdd item to container end.
Contains(TKey)Checks if key is present in container.
get_Comparer()Gets comparer.
idx_get(TKey)Gets item at specific index.
Remove(TKey)Removes key from container.
SetTemplateWeakPtr(uint32_t) overrideMakes specific template argument to be treated as weak pointer instead of shared pointer (if applicable).

Fields

FieldDescription
comparerComparer to use.
static defaultThresholdLookup dictionary creation threshold, default.
dictWrapped dictionary.
keyCountNumber of keys inserted into collection.
thresholdLookup dictionary creation threshold, local.

See Also