Name
DataRowCollection
Synopsis
This collection contains DataRow
objects.
It’s accessed through the
DataTable.Rows
property and contains the data for
a table. You can use the Find( )
method and
Contains( )
method to locate records. Both methods
accept a column value and search for it in the primary key field. If
a matching row is found, the Contains( )
method
returns true
, and the Find( )
method returns the DataRow
object.
public class DataRowCollection : InternalDataCollectionBase { // Public Instance Properties public DataRow this[intindex
]{get; } // Protected Instance Properties protected override ArrayList List{get; } // overrides InternalDataCollectionBase // Public Instance Methods public virtual DataRow Add(object[ ]values
); public void Add(DataRowrow
); public void Clear( ); public bool Contains(objectkey
); public bool Contains(object[ ]keys
); public DataRow Find(objectkey
); public DataRow Find(object[ ]keys
); public void InsertAt(DataRowrow
, intpos
); public void Remove(DataRowrow
); public void RemoveAt(intindex
); }
Hierarchy
System.Object
→
InternalDataCollectionBase(System.Collections.ICollection
, System.Collections.IEnumerable)
→
DataRowCollection
Returned By
DataTable.Rows
Get ADO.NET in a Nutshell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.