System::Collections::Generic::IDictionary::TryGetValue 方法

IDictionary::TryGetValue method

查找值并在找到时检索它。

virtual bool System::Collections::Generic::IDictionary<TKey, TValue>::TryGetValue(const TKey &key, TValue &value) const =0
参数类型描述
const TKey&要查找的键。
TValue&用于存储检索到的值的引用。

ReturnValue

如果找到并检索到值则为 true,否则为 false。

另见