0
点赞
收藏
分享

微信扫一扫

C#并行循环的使用

小龟老师 2022-04-26 阅读 167
c#
//	并行循环的使用
			int countNum = 0;
			List<orderInfo> repostsData = new List<orderInfo>();
			string sql = string.Format("Select Top 100000 orderNo from [order] ");
			repostsData = FollowUpReport_InitializeLINQ_D(sql);
            if (repostsData.Count > 0)
            {
				Parallel.ForEach(repostsData, item => {
					sql = string.Format("update [order] set aaa = 123 where ddbh = '{0}'", item.ddbh);
					countNum += ExecuteSql(sql);
				});
            }
举报

相关推荐

C# 嵌套循环

C#循环练习

C#基础【循环】

0 条评论