循环中逐一添加集合的方法

var tempbd=new List<TempBillDetailsView>();
 foreach (var eitem in bitem)
 {
   tempbd.Add(new TempBillDetailsView { StockId = getorder.StockId, PCS = getorder.PCS });
 }
原文地址:https://www.cnblogs.com/firstcsharp/p/3205818.html