ExtensionMethodsGetValueTKey, TValue Method |
Gets the value for the key from the dictionary specified, or null / default(TValue) if key not found or the key is null.
Namespace:
SD.LLBLGen.Pro.ORMSupportClasses
Assembly:
SD.LLBLGen.Pro.ORMSupportClasses (in SD.LLBLGen.Pro.ORMSupportClasses.dll) Version: 5.2.0.0 (5.2.17.0403)
Syntax public static TValue GetValue<TKey, TValue>(
this Dictionary<TKey, TValue> dictionary,
TKey key
)
<ExtensionAttribute>
Public Shared Function GetValue(Of TKey, TValue) (
dictionary As Dictionary(Of TKey, TValue),
key As TKey
) As TValue
Parameters
- dictionary
- Type: System.Collections.GenericDictionaryTKey, TValue
The dictionary. - key
- Type: TKey
The key.
Type Parameters
- TKey
- The type of the key.
- TValue
- The type of the value.
Return Value
Type:
TValuethe value for the key from the dictionary specified, or null / default(TValue) if key not found or the key is null.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
DictionaryTKey,
TValue. 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