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刪除。