✅ How to check whether a given list is present in the List of list
I have a List<List<int>> candidates and before adding into it want to check whether a list is already present. The condition is true all the time. How to implement the check condition for each addition
5 Replies
are you trying to make sure none of the lists in candidates have the same contents as the new list?
yes. Currently Candidates are the output which has duplicates need to remove the duplicates.
do SequenceEquals instead of ==
in the Any
== is checking reference equality
thanks that helped to solve it
Closed!