Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

DataTable::CreateDataReader Method ()

 

Returns a DataTableReader corresponding to the data within this DataTable.

Namespace:   System.Data
Assembly:  System.Data (in System.Data.dll)

public:
DataTableReader^ CreateDataReader()

Return Value

Type: System.Data::DataTableReader^

A DataTableReader containing one result set, corresponding to the source DataTable instance.

The following console application creates a DataTable instance. The example then passes the filled DataTableto a procedure that calls the CreateDataReader method, which iterates through the results contained within the DataTableReader.

No code example is currently available or this language may not be supported.

The example displays the following output in the console window:

1 Mary

2 Andy

3 Peter

4 Russ

.NET Framework
Available since 2.0
Return to top
Show:
© 2017 Microsoft