System.Data.DataRowCollection Class

Represents a collection of rows for a System.Data.DataTable.

See Also: DataRowCollection Members

Syntax

public sealed class DataRowCollection : InternalDataCollectionBase

Remarks

The System.Data.DataRowCollection is a major component of the System.Data.DataTable. While the System.Data.DataColumnCollection defines the schema of the table, the System.Data.DataRowCollection contains the actual data for the table, where each System.Data.DataRow in the System.Data.DataRowCollection represents a single row.

You can call the DataRowCollection.Add(DataRow) and DataRowCollection.Remove(DataRow) methods to insert and delete System.Data.DataRow objects from the System.Data.DataRowCollection. You can also call the DataRowCollection.Find(object) method to search for System.Data.DataRow objects that contain specific values in primary key columns, and the DataRowCollection.Contains(object) method to search character-based data for single words or phrases.

For other operations, such as sorting or filtering the System.Data.DataRowCollection, use methods on the System.Data.DataRowCollection’s associated System.Data.DataTable.

Requirements

Namespace: System.Data
Assembly: System.Data (in System.Data.dll)
Assembly Versions: 1.0.3300.0, 1.0.5000.0, 2.0.0.0