public void AcceptChanges()
{
long logScopeId = DataCommonEventSource.Log.EnterScope("<ds.DataTable.AcceptChanges|API> {0}", ObjectID);
try
{
DataRow[] oldRows = new DataRow[Rows.Count];
Rows.CopyTo(oldRows, 0);
// delay updating of indexes until after all
// AcceptChange calls have been completed
SuspendIndexEvents();
try
{
for (int i = 0; i < oldRows.Length; ++i)
{
if (oldRows[i].rowID != -1)
{
oldRows[i].AcceptChanges();
}
}
}
finally
{
RestoreIndexEvents(false);
}
}
finally
{
DataCommonEventSource.Log.ExitScope(logScopeId);
}
}