Is it possible to use a Lambda expression to return the minimum value of one field (ProgramQuantity) in a List of a custom class and another field(Program Price) in that class? If so, what might it look like?
decimal listMinQty = 0;
List<PriceLevel> TrackPrice = new List<PriceLevel>();
// add data to list here ...
listMinQty = TrackPrice.Min(c => c.ProgramQuantity);// CAN I RETURN more than ProgramQuantity?
}
public class PriceLevel
{
public decimal ProgramPrice { get; set; }
public int ProgramQuantity { get; set; }
public DateTime ProgramLastTime { get; set; }// Last Order Time
}