Partilhar via


AdditionalPropertiesDictionary<TValue>.IReadOnlyDictionary<String,TValue>.TryGetValue Method

Definition

Gets the value that is associated with the specified key.

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

Parameters

key
String

The key to locate.

value
TValue

When this method returns, the value associated with the specified key, if the key is found; otherwise, the default value for the type of the value parameter. This parameter is passed uninitialized.

Returns

true if the object that implements the IReadOnlyDictionary<TKey,TValue> interface contains an element that has the specified key; otherwise, false.

Implements

Applies to