将list集合中重复的元素只保留一个

    for (int i = 0; i < listRemove.Count; i++)
                {
                    for ( int j = listRemove.Count - 1;j>i;j--)
                    {
                        if (listRemove[i] == listRemove[j])
                        {
                            listRemove.RemoveAt(j);
                        }
                    }
                }
posted @ 2014-08-29 23:14  逍遥帝君  阅读(936)  评论(0编辑  收藏  举报