I have an array of unknown (to the current method) class objects. I do know that each class has a property called “Number”.
I am trying to write a LINQ query where I am looking for the object with the next Number in sequence. AKA, I’m at Number 8, use a LINQ query to find the object where Number=9.
Anyone got a suggestion?
Also, I use reflection often so don’t worry about avoiding it.
If as you indicated elsewhere that you designed all the classes then you could put that number property in an in interface and have all the classes implement that interface. Then, in the linq query, use the interface.