FillDictionary fills a Dictionary of objects from a DataReader

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

Syntax

C#
public static Dictionary<TKey, TValue> FillDictionary<TKey, TValue>(
	string keyField,
	IDataReader dr,
	bool closeReader
)
Visual Basic
Public Shared Function FillDictionary(Of TKey, TValue) ( 
	keyField As String,
	dr As IDataReader,
	closeReader As Boolean
) As Dictionary(Of TKey, TValue)

Parameters

keyField
Type: System..::..String
The key field used for the Key
dr
Type: System.Data..::..IDataReader
The Data Reader
closeReader
Type: System..::..Boolean
A flag indicating whether to close the reader.

Type Parameters

TKey
The key for the Dictionary
TValue
The value for the Dictionary Item

Return Value

returnsM:DotNetNuke.Common.Utilities.CBO.FillDictionary``2(System.String,System.Data.IDataReader,System.Boolean)

See Also