码迷,mamicode.com
首页 > Windows程序 > 详细

C# DatatTable某一列是否有重复判断

时间:2018-08-01 12:05:36      阅读:330      评论:0      收藏:0      [点我收藏+]

标签:row   col   重复   str   判断   turn   lag   att   atd   

public bool HasRepeatData(DataTable dt,string[] colName)
{
bool flag=false;
DataView myDataView = new DataView(dt);
if (myDataView.ToTable(true, colName).Rows.Count < dt.Rows.Count)
{
flag = true;
}
return flag;
}

C# DatatTable某一列是否有重复判断

标签:row   col   重复   str   判断   turn   lag   att   atd   

原文地址:https://www.cnblogs.com/clj0102/p/9399335.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!