diff options
| author | ivarlovlie <git@ivarlovlie.no> | 2022-06-16 18:35:29 +0200 |
|---|---|---|
| committer | ivarlovlie <git@ivarlovlie.no> | 2022-06-16 18:35:29 +0200 |
| commit | bc2b423e69385829e0094ede66f9acc89b5bead7 (patch) | |
| tree | 2e5d7c06706b4252b9282839fe5ef6882239e0fd /src | |
| parent | b32643281878638a23d0c0bafa2ec4b0cce42104 (diff) | |
| download | dotnet-helpers-bc2b423e69385829e0094ede66f9acc89b5bead7.tar.xz dotnet-helpers-bc2b423e69385829e0094ede66f9acc89b5bead7.zip | |
feat: Added IEnumerable.IsNullOrEmpty
Diffstat (limited to 'src')
| -rw-r--r-- | src/IOL.Helpers/EnumerableExtensions.cs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/IOL.Helpers/EnumerableExtensions.cs b/src/IOL.Helpers/EnumerableExtensions.cs new file mode 100644 index 0000000..89fa3a8 --- /dev/null +++ b/src/IOL.Helpers/EnumerableExtensions.cs @@ -0,0 +1,9 @@ +using System.Collections.Generic; +using System.Linq; + +namespace IOL.Helpers; + +public static class EnumerableExtension +{ + public static bool IsNullOrEmpty<T>(this IEnumerable<T> enumerable) => enumerable != null && !enumerable.Any<T>(); +} |
