First of all, thank you for the fantastic article, it will be so helpful for my future developments.
I think you have committed a mistake here in MinBy section:
varcheapest=foodList.OrderBy(f=>f.Price).List();
This will return a list and not a single element, which is what we want here. It should be instead:
varcheapest=foodList.OrderBy(f=>f.Price).First();
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
First of all, thank you for the fantastic article, it will be so helpful for my future developments.
I think you have committed a mistake here in MinBy section:
This will return a list and not a single element, which is what we want here. It should be instead: