Table of Contents

Method ToDataTable

Namespace
Open.Database.Extensions
Assembly
Open.Database.Extensions.Core.dll

ToDataTable(IDataReader)

Loads the current result set of an IDataReader into a DataTable.

public static DataTable ToDataTable(this IDataReader reader)

Parameters

reader IDataReader

The IDataReader to iterate.

Returns

DataTable

A DataTable that holds the result set.

Remarks

The reader stays open and is left on that result set, so NextResult() moves to the next one.

Exceptions

ArgumentNullException

reader is null.