System::Collections::Generic::operator== 方法

System::Collections::Generic::operator== method

使用 ’equals’ 语义比较两个键值对。对键和值均使用 operator == 或 EqualsTo 方法,以定义的为准。

template<typename TKey,typename TValue> bool System::Collections::Generic::operator==(const KeyValuePair<TKey, TValue> &left, const KeyValuePair<TKey, TValue> &right)
参数描述
TKey密钥类型。
TValue值类型。
参数类型描述
const KeyValuePair<TKey, TValue>&左侧操作数。
const KeyValuePair<TKey, TValue>&右侧操作数。

ReturnValue

如果键和值都匹配则为 true,否则为 false。

另见