using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Sample2 { class Program { static void Main(string[] args) { //List之Union(),Intersect(),Except() 即并集,交集,差集运算 IList<Student>…
C# 集合的交集 差集 并集 去重 两个对象list,直接比较是不行的,因为他们存的地址不一样 需要重写GetHashCode()与Equals(object obj)方法告诉电脑 class Student { public int Id { get; set; } public string Name { get; set; } public int Age { get; set; } } class CompareStudent : IEqualityComparer<Student>…
spark之交集并集差集拉链 def main(args: Array[String]): Unit = { val sparkConf = new SparkConf().setMaster("local[*]").setAppName("Operator") val sc = new SparkContext(sparkConf) // TODO 算子 - 双Value类型 // 交集,并集和差集要求两个数据源数据类型保持一致 // 拉链操作两个数据源的类型可以…