We have created custom Extension method to check IEnumerable
is Null Or Empty
public static bool IsNotNullOrEmpty<T>(this IEnumerable<T> listToCheck)
{
return listToCheck != null && listToCheck.Any();
}
Now Team want to create one more method reverse of above method with name IsNullOrEmpty
Concerns: 1. Should we expose such two function? if Yes -> Why Microsoft and other common library expose only one function Example: String has only IsNullOrEmpty
or IsNullOrWhiteSpace
not reverse of this function
I have confused about this kind of function. Any suggestion about this and what should we do?
Aucun commentaire:
Enregistrer un commentaire