FillCollection fills a List of objects from a DataReader

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

Syntax

C#
public static IList<TItem> FillCollection<TItem>(
	IDataReader dr,
	IList<TItem> objToFill,
	bool closeReader
)
Visual Basic
Public Shared Function FillCollection(Of TItem) ( 
	dr As IDataReader,
	objToFill As IList(Of TItem),
	closeReader As Boolean
) As IList(Of TItem)

Parameters

dr
Type: System.Data..::..IDataReader
The Data Reader
objToFill
Type: System.Collections.Generic..::..IList<(Of <(<'TItem>)>)>
The List to fill
closeReader
Type: System..::..Boolean
A flag that indicates whether the DataReader should be closed

Type Parameters

TItem
The type of the Object

Return Value

returnsM:DotNetNuke.Common.Utilities.CBO.FillCollection``1(System.Data.IDataReader,System.Collections.Generic.IList{``0},System.Boolean)

See Also