kangpengliang

博客园 首页 新随笔 联系 订阅 管理
 1 public ArrayList removeDuplicate(ArrayList arlList) 
 2    {   
 3                    ArrayList a2=new ArrayList();
 4                    a2.Add("ssssssss");        
 5                    for(int y=0;y<arlList.Count;y++)
 6                  {
 7                                    int asd=0;
 8                                    for(int i=0;i<a2.Count;i++)
 9                                {                
10                                                if(arlList[y].ToString()==a2[i].ToString())
11                                             {
12                                                        asd=1;                
13                                                   }
                
14                                       }

15                            if(asd!=1)
16                         {
17                                    a2.Add(arlList[y].ToString());
18                              }

19                    }

20                a2.RemoveAt(0);
21                return a2;
22        }
posted on 2006-08-16 23:36  chicly喨  阅读(821)  评论(0编辑  收藏  举报