CSharp examples for System.Collections:ICollection
Is ICollection Empty
using System.Collections.Generic; using System.Collections; using System;//from w w w . j a v a 2 s . co m public class Main{ public static bool IsEmpty<T>(ICollection<T> c) { return c == null || c.Count == 0; } public static bool IsEmpty(ICollection c) { return c == null || c.Count == 0; } }