2个集合合并,有相同的只取中其一个:
source code:
int[] a = { 3, 5, 7 }; int[] b = { 5, 6, 9 }; var result = a.Union(b); result.ForEach(delegate (int n) { WriteLiteral(n + "<br>"); });