AdditionalPropertiesDictionary<TValue>.IDictionary<String,TValue>.TryGetValue 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
取得與指定索引鍵相關聯的值。
virtual bool System.Collections.Generic.IDictionary<System.String,TValue>.TryGetValue(System::String ^ key, [Runtime::InteropServices::Out] TValue % value) = System::Collections::Generic::IDictionary<System::String ^, TValue>::TryGetValue;
bool IDictionary<string,TValue>.TryGetValue(string key, out TValue value);
abstract member System.Collections.Generic.IDictionary<System.String,TValue>.TryGetValue : string * 'Value -> bool
override this.System.Collections.Generic.IDictionary<System.String,TValue>.TryGetValue : string * 'Value -> bool
Function TryGetValue (key As String, ByRef value As TValue) As Boolean Implements IDictionary(Of String, TValue).TryGetValue
參數
- key
- String
該取得價值的鑰匙。
- value
- TValue
當此方法回傳與指定鍵相關聯的值(若找到鍵);否則,參數類型的 value 預設值。 這個參數會未初始化傳遞。
傳回
true 若實作 IDictionary<TKey,TValue> 物件包含具有指定鍵的元素;否則, false。