3

Is there any easy way to remove the contents of one array from another?

1 Answer 1

2

If you have LINQ

array.Except(array2);
Sign up to request clarification or add additional context in comments.

1 Comment

this would also remove the duplicates? how to remove the contents of one array from another? e.g. when {2,3,5} is removed from {2, 2, 2, 3, 5, 7}, it should return {2, 2, 7}.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.