ソースコード
using System.Collections.Generic; public static class IListExtensions { public static bool IsEmpty<T>( this IList<T> self ) { return self.Count == 0; } }
使い方
var x = new int[ 0 ]; var y = new int[ 1 ]; x.IsEmpty(); // True y.IsEmpty(); // False