Chashitsu

Check if list A contains any item of list B

May 19th, 2018
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.10 KB | None | 0 0
  1. var A = new int[]{1,3,5};
  2. var B = new int[]{5,6};
  3. if(A.Intersect(B).Any())
  4. {
  5.     // do something
  6. }
Add Comment
Please, Sign In to add comment