Example #1
0
 public Sugar FindFirstSugarCandy()
 {
     return((Sugar)Sweets.Find(x => x is Sugar));
 }
Example #2
0
 public Chocolate FindFirstChocolateCandy()
 {
     return((Chocolate)Sweets.Find(x => x is Chocolate));
 }
Example #3
0
 public Sweet FindFirstBySugarPercentageRange(double minimumPercentage, double maximumPercentage)
 {
     return(Sweets.Find(x => x.SugarPercentage >= minimumPercentage && x.SugarPercentage <= maximumPercentage));
 }