泛型集合中追加一行

List<Account_DayCoinAdd> rest = CoinServices.GiftCoin(bdate, edate);
long sumnums = 0;
for (int i=0;i<rest.Count; i++) {
sumnums += rest[i].nums;
}
rest.Insert(rest.Count, new Account_DayCoinAdd() { ntype = "汇总", nName = "", nums= sumnums });

posted @ 2018-08-17 10:37  ITMrRight  阅读(169)  评论(0编辑  收藏  举报