ExpandoObject.IDictionary<String,Object>.TryGetValue Metoda

Definice

Získá hodnotu přidruženou k zadanému klíči.

 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

Parametry

key
String

Klíč hodnoty, kterou chcete získat.

value
Object

Pokud tato metoda vrátí, obsahuje hodnotu přidruženou k zadanému klíči, pokud je nalezen klíč; v opačném případě obsahuje výchozí hodnotu pro typ parametru value . Tento parametr se předává neinicializovaný.

Návraty

true pokud objekt, který implementuje IDictionary<TKey,TValue> obsahuje prvek, který má zadaný klíč; jinak , false.

Platí pro