ExpandoObject.IDictionary<String,Object>.TryGetValue 方法

定義

取得與指定索引鍵關聯的值。

 virtual bool System.Collections.Generic.IDictionary<System.String,System.Object>.TryGetValue(System::String ^ key, [Runtime::InteropServices::Out] System::Object ^ % value) = System::Collections::Generic::IDictionary<System::String ^, System::Object ^>::TryGetValue;
bool IDictionary<string,object>.TryGetValue (string key, out object value);
abstract member System.Collections.Generic.IDictionary<System.String,System.Object>.TryGetValue : string * obj -> bool
override this.System.Collections.Generic.IDictionary<System.String,System.Object>.TryGetValue : string * obj -> bool
Function TryGetValue (key As String, ByRef value As Object) As Boolean Implements IDictionary(Of String, Object).TryGetValue

參數

key
String

要取得之值的索引鍵。

value
Object

如果找到索引鍵,則這個方法傳回時會包含與指定索引鍵相關聯的值,否則會包含 value 參數類型的預設值。 這個參數會以未初始化的狀態傳遞。

傳回

如果實作 false 之物件包含具有指定索引鍵的項目,則為 true;否則為 IDictionary<TKey,TValue>

適用於