The obtains the contents of one or more DataTable objects in the form of one or more read-only, forward-only result sets.
Assembly: System.Data (in System.Data.dll)
The works much like any other data reader, such as the SqlDataReader, except that the provides for iterating over rows in a DataTable. In other words, it provides for iterating over rows in a cache. The cached data can be modified while the is active, and the reader automatically maintains its position.
When you create a from a DataTable, the resulting object contains one result set with the same data as the DataTable from which it was created, except for any rows that have been marked as deleted. The columns appear in the same order as in the original DataTable. The structure of the returned result is identical in schema and data to the original DataTable. A that was created by calling the GetDataReader method of a DataSet object contains multiple result sets if the DataSet contains more than one table. The results are in the same sequence as the DataTable objects in the DataTableCollection of the DataSet object.
The returned result set contains only the current version of each DataRow; rows that are marked for deletion are skipped.
The DataTableReader provides a stable iterator; that is, the contents of the DataTableReader are not invalidated if the size of the underlying collection is modified during iteration. For example, if one or more rows in the Rows collection are deleted or removed during iteration, the current position within the DataTableReader is maintained appropriately and it does not invalidate the iterator.
Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98, Windows CE, Windows Mobile for Smartphone, Windows Mobile for Pocket PC, Xbox 360, Zune
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.