Say I have this class:
class Person {
public int ID;
public string Name;
}
And then I have a list of Person's.
List<Person> persons = new List<Person>();
Which is filled with a lot of random faces. How to request a list to get the person with the lowest ID? The objects in the list are in random order, so the person with the smallest identifier may not be the very first element. Can I achieve this without sorting the list first?
source
share