如何选择列表的最小数量 [英] how to select Minimum number of List
本文介绍了如何选择列表的最小数量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好
是否有内置功能选择列表的最小数量?
在C#
Hi all
are there built in function to select the minimum number of a list ?
in C#
推荐答案
中尝试以下操作(假设列表中的数据类型具有IComparable接口):
Try the following (assuming the data type in the list has an IComparable interface) :
var min= list.Sort()[0];
没有这种东西;永远不需要那样的东西;这个问题根本没有道理.
—SA
There is no such thing; nothing like that is needed, ever; the question makes no sense at all.
—SA
这篇关于如何选择列表的最小数量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文