[C#] Finding the index of a queue that holds a member of a containing object for a given value
- by Luke Mcneice
I have a Queue that contains a collection of objects, one of these objects is a class called GlobalMarker that has a member called GlobalIndex.
What I want to be able to do is find the index of the queue where the GlobalIndex contains a given value (this will always be unique).
Simply using the .contains function shown bellow returns a bool. How can I obtain the queue index of this match?
RealTimeBuffer.OfType<GlobalMarker>().Select(o => o.GlobalIndex).Contains(INT_VALUE);