您的位置:首页 > 编程语言 > C#

C#去掉list集合中的重复数据

2013-08-15 16:34 225 查看
List<string> conList= new List<string>();
List<string> listII = new List<string>();
int m = 0;
for (int i = 0; i < conList.Count; i++)
{
string i_value = (string)conList[i];
for (int j = 0; j < conList.Count; j++)
{
string j_value = (string)conList[j];
if (i_value.cfg_Value == j_value.cfg_Value)
{
if (i != j)
{
m = j;
j--;
}
else
{
string con = (string)conList[i];
listII.Add(con);
}
}
}
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: