summaryM:DotNetNuke.Common.Utilities.DictionaryExtensions.SetValue``1(System.Collections.IDictionary,System.Object,``0,``0)

Namespace: DotNetNuke.Common.Utilities
Assembly: DotNetNuke (in DotNetNuke.dll)

Syntax

C#
public static void SetValue<T>(
	this IDictionary bag,
	Object key,
	T value,
	T defaultValue
)
Visual Basic
<ExtensionAttribute> 
Public Shared Sub SetValue(Of T) ( 
	bag As IDictionary,
	key As Object,
	value As T,
	defaultValue As T
)

Parameters

bag
Type: System.Collections..::..IDictionary
parambagM:DotNetNuke.Common.Utilities.DictionaryExtensions.SetValue``1(System.Collections.IDictionary,System.Object,``0,``0)
key
Type: System..::..Object
paramkeyM:DotNetNuke.Common.Utilities.DictionaryExtensions.SetValue``1(System.Collections.IDictionary,System.Object,``0,``0)
value
Type: T
paramvalueM:DotNetNuke.Common.Utilities.DictionaryExtensions.SetValue``1(System.Collections.IDictionary,System.Object,``0,``0)
defaultValue
Type: T
paramdefaultValueM:DotNetNuke.Common.Utilities.DictionaryExtensions.SetValue``1(System.Collections.IDictionary,System.Object,``0,``0)

Type Parameters

T
typeparamTM:DotNetNuke.Common.Utilities.DictionaryExtensions.SetValue``1(System.Collections.IDictionary,System.Object,``0,``0)

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].

See Also