Let´s say I have an array (I named it "Points") of objects. Each object has a custom property called for example "Selected". The property type is Boolean.
Can I use LINQ to determine the INDEX of the element in the "Points" array where "Selected=True"? (I´ve ensured that only one element can have the property set to True).
I know how to do it the "old way" (using a loop), but it would be better getting rid of any loops.
Can I use LINQ to determine the INDEX of the element in the "Points" array where "Selected=True"? (I´ve ensured that only one element can have the property set to True).
I know how to do it the "old way" (using a loop), but it would be better getting rid of any loops.