 | IDictionaryPropertyExtensionsTryGetValueTKey, TItem(IDictionaryPropertyTKey, IPropertyWithValidValuesTItem, TItem, TKey, IPropertyWithValidValuesTItem) Method |
Attempts to obtain a value associated with given key from this dictionary
Namespace: TSD.API.Remoting.Common.PropertiesAssembly: TSD.API.Remoting (in TSD.API.Remoting.dll) Version: 24.0.1.45+53a79b69d75fb81c51fcd389e0bdcf241e5b9f7c
Syntaxpublic static bool TryGetValue<TKey, TItem>(
this IDictionaryProperty<TKey, IPropertyWithValidValues<TItem>, TItem> dictionaryProperty,
TKey key,
out IPropertyWithValidValues<TItem> value
)
<ExtensionAttribute>
Public Shared Function TryGetValue(Of TKey, TItem) (
dictionaryProperty As IDictionaryProperty(Of TKey, IPropertyWithValidValues(Of TItem), TItem),
key As TKey,
<OutAttribute> ByRef value As IPropertyWithValidValues(Of TItem)
) As Boolean
public:
[ExtensionAttribute]
generic<typename TKey, typename TItem>
static bool TryGetValue(
IDictionaryProperty<TKey, IPropertyWithValidValues<TItem>^, TItem>^ dictionaryProperty,
TKey key,
[OutAttribute] IPropertyWithValidValues<TItem>^% value
)
[<ExtensionAttribute>]
static member TryGetValue :
dictionaryProperty : IDictionaryProperty<'TKey, IPropertyWithValidValues<'TItem>, 'TItem> *
key : 'TKey *
value : IPropertyWithValidValues<'TItem> byref -> bool Parameters
- dictionaryProperty IDictionaryPropertyTKey, IPropertyWithValidValuesTItem, TItem
- The dictionary to query
- key TKey
- The key to look for
- value IPropertyWithValidValuesTItem
- The resulting value associated with given key
Type Parameters
- 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
Return Value
BooleanTrue in case the given key is present in the dictionary and the value has been retrieved; false otherwise
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
IDictionaryPropertyTKey,
IPropertyWithValidValuesTItem,
TItem. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).
See Also