I have this array :
Point[] arr = samples.pointsArray;
I using this row to retrieve all elements that satisfy condition:
var maxXCol = arr.Where( p => maxX.X == p.X );
Any idea how to modify row above, to get only the indexes of these elements?
Thank you in advance!
EDIT
Use the version of
Selectthat takes both the index and the object and create an anonymous object with the object and index inside it. It would look like this:You’ll need to do this before you use
Whereso that the original index remains intact after the filter operation.In the following operations you can use the item like so:
and the index like so: