我有两个字符串列表。
1:
new List<string>{ "jan", "feb", "nov" }
2:
new List<string>{ "these are the months", "this is jan,", "this is feb,", "this is mar,", "this is jun,", "this is nov"}
我希望我的结果是:
List<string>{ "these are the months", "this is jan,", "this is feb,", "this is nov"}
现在我正在做一个凌乱的拆分,然后是一个包含嵌套 foreach 的 linq。
但是必须有一个更简单的方法,我想到了一个 linq left JOIN,左边有列表 2,但不知道如何实现它,如果这甚至是正确的方法。
有任何想法吗?
谢谢。