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


            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);
                        }
                    }
                }
            }

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。