public static bool IsEmpty(this ArrayList list)
{
return list.Count == 0;
}
public static bool IsNotEmpty(this ArrayList list)
{
return list.Count > 0;
}
I know that it’s not big deal but I would rather write: if (list.IsEmpty()) then if (list.Count == 0). The first one is just much more readable.
No comments:
Post a Comment