CSharp examples for System.Collections:ICollection
Get max value from ICollection
using System.Collections; using System;//from ww w . j av a 2s . com public class Main{ public static object max(ICollection collection) { object max = null; foreach (IComparable obj in collection) { if (obj.CompareTo(max) > 0 || max == null) max = obj; } return max; } }