草庐IT

oItemAccount

全部标签

c# - Parallel.Foreach 给出错误 "Index was outside the bounds of the array "

我在parallel.foreach中遇到了一些问题,即“索引超出了数组的范围”。我附上了parallel.foreach的一些代码以及崩溃的地方。varlstFRItems=session.CreateCriteria().Add(Restrictions.Eq("TSCEnterprise.FEnterpriseID",EnterpriseId)).AddOrder(Order.Asc("FName")).List();ListlstItemAccount=newList();varListAccounts=session.CreateCriteria().List();//lst