我有两个列表
ListA ={'a','b','c','d','e'};
ListB ={'a','c','d','f'}
Run Code Online (Sandbox Code Playgroud)
我需要ListC来自ListA和ListB,等等ListC= {'b','e'}
这可能ListC吗?如何实现?
使用Except方法:
var result = ListA.Except(ListB);
//result: b, e
Run Code Online (Sandbox Code Playgroud)