Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

check that IEnumerable is not empty

public static class Utils {
    public static bool IsAny<T>(this IEnumerable<T> data) {
        return data != null && data.Any();
    }
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #check #IEnumerable #empty
ADD COMMENT
Topic
Name
5+9 =