System.Data.DataTable.InsertRow C# (CSharp) Method

InsertRow() private method

private InsertRow ( DataRow row, int proposedID, int pos ) : void
row DataRow
proposedID int
pos int
return void
        internal void InsertRow(DataRow row, int proposedID, int pos) => InsertRow(row, proposedID, pos, fireEvent: true);

Same methods

DataTable::InsertRow ( DataRow row, long proposedID ) : void
DataTable::InsertRow ( DataRow row, long proposedID, int pos, bool fireEvent ) : void

Usage Example

Example #1
0
 public void InsertAt(DataRow row, int pos)
 {
     if (pos < 0)
     {
         throw ExceptionBuilder.RowInsertOutOfRange(pos);
     }
     if (pos >= list.Count)
     {
         table.AddRow(row, -1);
     }
     else
     {
         table.InsertRow(row, -1, pos);
     }
 }
DataTable