I have a list of objects which all have an id property
E.g
1, 10, 25, 30, 4
I have a currentId and I need to find the next Id in the list
So for example current Id is set to 25, I need to return the object with an id of 30. The one after that would be 4.
How would I do this elegantly in LINQ?
EDIT
The list is ordered by a "sort" property. So you cannot just order by id, as that would mess up the order.