Gets the value from the dictionary.

Namespace: DotNetNuke.Collections
Assembly: DotNetNuke (in DotNetNuke.dll)

Syntax

C#
public static T GetValue<T>(
	this IDictionary dictionary,
	string key,
	Func<Object, T> converter
)
Visual Basic
<ExtensionAttribute> 
Public Shared Function GetValue(Of T) ( 
	dictionary As IDictionary,
	key As String,
	converter As Func(Of Object, T)
) As T

Parameters

dictionary
Type: System.Collections..::..IDictionary
The dictionary.
key
Type: System..::..String
The key by which to get the value.
converter
Type: System..::..Func<(Of <(<'Object, T>)>)>
A function to convert the value as an Object to a T instance.

Type Parameters

T
The type of the value to retrieve

Return Value

A T instance.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IDictionary. When you use instance method syntax to call this method, omit the first parameter. For more information, see [b8020aae-374d-46a9-bcb7-8cc2390b93b6] or [175ce3ff-9bbf-4e64-8421-faeb81a0bb51].

Exceptions

ExceptionCondition
System..::..ArgumentNullExceptiondictionary or converter is null
System..::..ArgumentExceptiondictionary does not contain a value for key

See Also