Method TryGetValue

TryGetValue<TKey, TItem>(IDictionaryProperty<TKey, IReadOnlyProperty<TItem>, TItem>, TKey, out IReadOnlyProperty<TItem>)

Attempts to obtain a value associated with given key from this dictionary

Declaration
public static bool TryGetValue<TKey, TItem>(this IDictionaryProperty<TKey, IReadOnlyProperty<TItem>, TItem> dictionaryProperty, TKey key, out IReadOnlyProperty<TItem> value)
Parameters
Type Name Description
IDictionaryProperty<TKey, IReadOnlyProperty<TItem>, TItem> dictionaryProperty

The dictionary to query

TKey key

The key to look for

IReadOnlyProperty<TItem> value

The resulting value associated with given key

Returns
Type Description
bool

True in case the given key is present in the dictionary and the value has been retrieved; false otherwise

Type Parameters
Name Description
TKey

The type of keys used to access the item wrappers stored in the dictionary

TItem

The type of items stored in the wrappers in the dictionary

TryGetValue<TKey, TItem>(IDictionaryProperty<TKey, IProperty<TItem>, TItem>, TKey, out IProperty<TItem>)

Attempts to obtain a value associated with given key from this dictionary

Declaration
public static bool TryGetValue<TKey, TItem>(this IDictionaryProperty<TKey, IProperty<TItem>, TItem> dictionaryProperty, TKey key, out IProperty<TItem> value)
Parameters
Type Name Description
IDictionaryProperty<TKey, IProperty<TItem>, TItem> dictionaryProperty

The dictionary to query

TKey key

The key to look for

IProperty<TItem> value

The resulting value associated with given key

Returns
Type Description
bool

True in case the given key is present in the dictionary and the value has been retrieved; false otherwise

Type Parameters
Name Description
TKey

The type of keys used to access the item wrappers stored in the dictionary

TItem

The type of items stored in the wrappers in the dictionary

TryGetValue<TKey, TItem>(IDictionaryProperty<TKey, IPropertyWithValidValues<TItem>, TItem>, TKey, out IPropertyWithValidValues<TItem>)

Attempts to obtain a value associated with given key from this dictionary

Declaration
public static bool TryGetValue<TKey, TItem>(this IDictionaryProperty<TKey, IPropertyWithValidValues<TItem>, TItem> dictionaryProperty, TKey key, out IPropertyWithValidValues<TItem> value)
Parameters
Type Name Description
IDictionaryProperty<TKey, IPropertyWithValidValues<TItem>, TItem> dictionaryProperty

The dictionary to query

TKey key

The key to look for

IPropertyWithValidValues<TItem> value

The resulting value associated with given key

Returns
Type Description
bool

True in case the given key is present in the dictionary and the value has been retrieved; false otherwise

Type Parameters
Name Description
TKey

The type of keys used to access the item wrappers stored in the dictionary

TItem

The type of items stored in the wrappers in the dictionary

Was this helpful?
The feedback you give here is not visible to other users. We use your comments to improve the content.
Previous
Next