System::Collections::Generic::KeyValuePair class

KeyValuePair class

Pair of key and value. This type should be allocated on stack and passed to functions by value or by reference. Never use System::SmartPtr class to manage objects of this type.

template<typename TKey,typename TValue>class KeyValuePair

Methods

MethodDescription
get_Key() constGets key.
get_Value() constGets value.
GetHashCode() constCalculates key-value pair hash by xoring key’s and value’s hashes.
IsNull() constAlways returns false.
KeyValuePair()Null key-value pair initializer.
KeyValuePair(const TKey&, const TValue&)Constructor.
KeyValuePair(const std::pair<OtherK, OtherV>&)Type conversion constructor.
operator<(const KeyValuePair&) constPatch for classes inherited from IComparer<KeyValuePair<TKey, TValue», doesn’t compare anything.
ToString() constConverts key-value pair to string.

See Also