I have a List<int>
with several elements. I know I can get all the values if I iterate through it with foreach
, but I just want the maximum int value in the list.
var l = new List<int>() { 1, 3, 2 };
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…