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

Definition

Gets the value that is associated with the specified key.

C#
bool IReadOnlyDictionary<string,TValue>.TryGetValue(string key, out TValue value);

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

Продукт Версії
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided)
.NET Standard 2.0 (package-provided)