list operation in C# -
i have 2 lists
lista ={'a','b','c','d','e'}; listb ={'a','c','d','f'}
i need listc
lista
, listb
, such listc= {'b','e'}
is possible , how listc
?
var lista = new list<char> { 'a', 'b', 'c', 'd', 'e' }; var listb = new list<char> { 'a', 'c', 'd', 'f' }; var listc = lista.except(listb).tolist(); // ^^ has 2 items; 'b' , 'c'