How to find the highest and minimum value. I have to give 10 toolbox and add 1 value in each. When i press the button. It shows me the Highest and Lowest value. Using If else.
C# If else statment
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.


Afzaal Ahmad ZeeshanRank #60 · 27.6K reputationPosted Aug 18, 2015, 1:50 AM EDT
Upendra Pratap ShahiRank #329 · 7.5K reputationPosted Aug 18, 2015, 2:01 AM EDT
Use list for this -
var max = listMaxMin .Max();//10
var min = listMaxMin .Min(); //1