FillDictionary fills a Dictionary of objects from a DataReader
Namespace: DotNetNuke.Common.UtilitiesAssembly: 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