This only seems to happen some times
Here is the stack trace:
at System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource) at System.ThrowHelper.ThrowArgumentOutOfRangeException() at System.Collections.Generic.List`1.get_Item(Int32 index) at System.Data.DataTable.get_LiveIndexes() at System.Data.DataTable.SetShadowIndexes() at System.Data.DataTable.ResetInternalIndexes(DataColumn column) at System.Data.DataTable.Clear(Boolean clearAll) at System.Data.DataSet.Clear()
I found out that the problem was caused by multi-threading. Putting locks around the
DataSetstopped this exception from happening.