15 lines
379 B
C#
15 lines
379 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Diagnostics.CodeAnalysis;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace Extensions {
|
|
public static class IEnumerableExtensions {
|
|
|
|
public static bool IsNullOrEmpty<T>([NotNullWhen(false)] this IEnumerable<T>? list) =>
|
|
list == null || (list != null && !list.Any());
|
|
}
|
|
}
|