开发者

Get Unique record from one list that not match with other?

开发者 https://www.devze.com 2023-03-23 02:03 出处:网络
Hi I开发者_JAVA百科 have two list I want to get Unique record from first list that not match with other.

Hi I开发者_JAVA百科 have two list I want to get Unique record from first list that not match with other.

Example

List = [1,2,3,4,5,6,7]

List = [1,2,3,4,5,8]

According to my need output should be like this [6,7].

Please suggest me how it will be done?


IEnumerable<int> result = list1.Except(list2);


You can use Except

0

精彩评论

暂无评论...
验证码 换一张
取 消