public void Clear()
{
long logScopeId = DataCommonEventSource.Log.EnterScope("<ds.DataTableCollection.Clear|API> {0}", ObjectID);
try
{
int oldLength = _list.Count;
DataTable[] tables = new DataTable[_list.Count];
_list.CopyTo(tables, 0);
OnCollectionChanging(s_refreshEventArgs);
if (_dataSet._fInitInProgress && _delayedAddRangeTables != null)
{
_delayedAddRangeTables = null;
}
BaseGroupSwitch(tables, oldLength, null, 0);
_list.Clear();
OnCollectionChanged(s_refreshEventArgs);
}
finally
{
DataCommonEventSource.Log.ExitScope(logScopeId);
}
}