internal void RegisterName(string name, string tbNamespace)
{
DataCommonEventSource.Log.Trace("<ds.DataTableCollection.RegisterName|INFO> {0}, name='{1}', tbNamespace='{2}'", ObjectID, name, tbNamespace);
Debug.Assert(name != null);
CultureInfo locale = _dataSet.Locale;
int tableCount = _list.Count;
for (int i = 0; i < tableCount; i++)
{
DataTable table = (DataTable)_list[i];
if (NamesEqual(name, table.TableName, true, locale) != 0 && (tbNamespace == table.Namespace))
{
throw ExceptionBuilder.DuplicateTableName(((DataTable)_list[i]).TableName);
}
}
if (NamesEqual(name, MakeName(_defaultNameIndex), true, locale) != 0)
{
_defaultNameIndex++;
}
}