Let\'s say I have this class:
class Person { public int ID; public string Name; }
And then I have a list of Person\'s.
this is without sorting the list and just iterates the list once.
Person minIdPerson = persons[0]; foreach (var person in persons) { if (person.ID < minIdPerson.ID) minIdPerson = person; }