<分区>
我有两个列表。
List<string> a = new List<string>();
List<string> b = new List<string>();
a.Add("a");
a.Add("b");
a.Add("c");
b.Add("a");
b.Add("c");
我想将 Distinct 值放入新列表中。
<分区>
我有两个列表。
List<string> a = new List<string>();
List<string> b = new List<string>();
a.Add("a");
a.Add("b");
a.Add("c");
b.Add("a");
b.Add("c");
我想将 Distinct 值放入新列表中。
最佳答案
a.Concat(b).Distinct();
关于c# - 如何从两个 List<string> 中获取不同的值?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3585734/