我在互联网上搜索了一段时间,但找不到我真正需要的东西。我的问题是我有两个 linq 语句,我计划将它们放在 UNION 中,以便将它们合并到一组列表中,但我想删除那些重复的值。具体来说,这里是一个场景:
query 1 = "this is a test","Yes", "This is a remark"
"this is a test2","No", "This is the second remark"
query 2 = "this is a test","",""
"this is a test2","",""
"this is a test3","",""
"this is a test4","",""
现在我想要发生的是这样的:
"this is a test","Yes", "This is a remark"
"this is a test2","No", "This is the second remark",
"this is a test3","",""
"this is a test4","",""
我怎样才能在 LINQ 中做到这一点?提前谢谢!