网站导航网学 原创论文 原创专题 网站设计 最新系统 原创论文 论文降重 发表论文 论文发表 UI设计定制 论文答辩PPT格式排版 期刊发表 论文专题
返回网学首页
网学原创论文
最新论文 推荐专题 热门论文 论文专题
当前位置: 网学 > 设计资源 > .Net编程 > 正文

字符串数组去掉重复值方法

论文降重修改服务、格式排版等 获取论文 论文降重及排版 论文发表 相关服务
  1. using System; 
  2. using System.Collections; 
  3. using System.Collections.Specialized; 
  4. namespace test 
  5.     class myTest 
  6.     { 
  7.         static void Main() 
  8.         { 
  9.  
  10.             string arrInt = new string { "1""1""2""3""4""33""4""66""77""2""44""33" }; 
  11.             ArrayList arr = new ArrayList(); 
  12.             foreach (string i in arrInt) 
  13.             { 
  14.                 if (arr.IndexOf(i) < 0) 
  15.                 { 
  16.                     arr.Add(i); 
  17.                      
  18.                 } 
  19.             } 
  20.  
  21.             //输出测试    
  22.             arrInt = (string)arr.ToArray(typeof(string)); 
  23.             foreach (string n in arrInt) 
  24.             { 
  25.                 Console.WriteLine(n); 
  26.             }    
  27.         } 
  28.     } 
  • 下一篇资讯: c#.net常用函数列表
  • 设为首页 | 加入收藏 | 网学首页 | 原创论文 | 计算机原创
    版权所有 网学网 [Myeducs.cn] 您电脑的分辨率是 像素
    Copyright 2008-2020 myeducs.Cn www.myeducs.Cn All Rights Reserved 湘ICP备09003080号 常年法律顾问:王律师