List<string> Ashuzu = new List<string>();
Ashuzu.Add("");
       Ashuzu.Add("");
       Ashuzu.Add("");
List<string> Bshuzu = new List<string>();
Bshuzu.Add("");
       Bshuzu.Add("");
       Bshuzu.Add("");
List<string> Cshuzu = new List<string>();
foreach (string aitem in Ashuzu)
{
if (!Bshuzu.Contains(aitem))
{
Cshuzu.Add(aitem);
}
}
      

c# 两个数组比较,将重复部分去掉,返回不重复部分的更多相关文章

  1. 比较两个数组的键名,并返回交集:array_intersect_key

    $a1=array("a"=>"red","b"=>"green","c"=>&q ...

  2. php比较两个数组的差异array_diff()函数

    下面简单介绍php比较两个数组的差异array_diff()函数. 原文地址:小时刻个人技术博客 > http://small.aiweimeng.top/index.php/archives/ ...

  3. JS取出两个数组中不重复的值

    var array = [0, 1, 2, 3, 4, 'age', 6, 7, 8, 9]; var array2 = [0, 1, 'age', 6, 7, 8, 9]; var arr3 = [ ...

  4. 笔试算法题(28):删除乱序链表中的重复项 & 找出已经排好序的两个数组中的相同项

    出题:给定一个乱序链表,节点值为ASCII字符,但是其中有重复项,要求去除重复项并保证不改变剩余项的原有顺序: 分析:创建一个256(2^8)大小的bool数组,初始化为false,顺序读取链表,将字 ...

  5. JS数组的交集、并集、差集,数组去重,获取两个数组重复的元素,去除两个数组相同的元素

    let arr1=[1,2,3,4,5,6] let arr2=[4,5,6,7,8,9] // 并集 数组去重 let RemoveSame=[...new Set([...arr1,...arr2 ...

  6. JavaScript 将两个数组合并,且删除重复的值

    var a=[1,2,3,4,5,8,9,10]; var b=[6,7,8,9,10]; var c = a.concat(b);//合并成一个数组 console.log(c) temp = {} ...

  7. 数组去重,排序,重复次数,两个数组合并,两个数组去重,map(),filter(),reduce()

    <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title> ...

  8. [LeetCode] Intersection of Two Arrays II 两个数组相交之二

    Given two arrays, write a function to compute their intersection. Example:Given nums1 = [1, 2, 2, 1] ...

  9. [LeetCode] Intersection of Two Arrays 两个数组相交

    Given two arrays, write a function to compute their intersection. Example:Given nums1 = [1, 2, 2, 1] ...

  10. leetcode 349:两个数组的交集I

    Problem: Given two arrays, write a function to compute their intersection. 中文:已知两个数组,写一个函数来计算它们的交集 E ...

随机推荐

  1. stl 容器

    10.1.2.2容器的分类 序列式容器(Sequence containers) 每个元素都有固定位置--取决于插入时机和地点,和元素值无关. vector.deque.list  关联式容器(Ass ...

  2. Python_爬虫4

    Python爬虫入门(8):Beautiful Soup的用法 上一节我们介绍了正则表达式,它的内容其实还是蛮多的,如果一个正则匹配稍有差池,那可能程序就处在永久的循环之中,而且有的小伙伴们也对写正则 ...

  3. 用联想wndows8系统做android调试开发,adb server无法启动的原因

    今天换了台笔记本,联想V480的,装好开发软件,配置好一环境,于是打算先试一下能不能用,结果在eclipse devices中死活看不到设备,于是开如找各种问题,最后在度娘的帮助下终于找到了答案,我的 ...

  4. Windows Service 之 安装失败后的删除

    一个windows服务在卸载之后并不会马上从服务列表中消失掉,而是在服务列表中会显示服务被禁用:这样在你需要再次安装同名服务时,就装不了了,会被提示同名的服务已经存在.如果是在本地安装,这种情况很容易 ...

  5. B. Little Dima and Equation

    time limit per test 1 second memory limit per test 256 megabytes input standard input output standar ...

  6. SSIS 学习(1): 概要【转】

    俗话说:“十年磨一剑”,Microsoft 通过5年时间的精心打造,于2005年浓重推出Sql Server 2005,这是自SQL Server 2000 以 后的又一旷世之作.这套企业级的数据库解 ...

  7. The required Server component failed to start so Tomcat is unable to start解决之一

    http://www.cnblogs.com/quxuedan/archive/2012/12/11/2813445.html 看看这个博客园园主说的吧

  8. 邮件工具类--EmailUtil

    /* Copyright Notice ===================================================* * This file contains propri ...

  9. Class类中getMethods() 与getDeclaredMethods() 方法的区别

    一:jdk API中关于两个方法的解释 1:getMethods(),该方法是获取本类以及父类或者父接口中所有的公共方法(public修饰符修饰的) 2:getDeclaredMethods(),该方 ...

  10. 转:Android开发中的MVP架构(最后链接资源不错)

    Android开发中的MVP架构 最近越来越多的人开始谈论架构.我周围的同事和工程师也是如此.尽管我还不是特别深入理解MVP和DDD,但是我们的新项目还是决定通过MVP来构建. 这篇文章是我通过研究和 ...