Reputation: 179
I have a List of Arrays ... And I want to check if an exact array is in List or not
List<int[]> Output = new List<int[]>();
I have an Array
int[] coordinates
I want to check if coordinates array is exactly in List or Not?
Upvotes: 4
Views: 239
Reputation: 56413
Use SequenceEqual
:
bool result = Output.Any(a => a.SequenceEqual(coordinates));
Upvotes: 7