My solution is
class Test
{
public int X;
}
class Program
{
static void Main(string[] args)
{
var arr = new List<Test>();
var min = arr.Min(x => x.X);
Test a = arr.First(y => y.X == min);
}
}
Can this be done in just one-line (only iterating the list once instead of twice)?