Method EmptyOrNull
- Namespace
- DisCatSharp.Common
- Assembly
- DisCatSharp.Common.dll
EmptyOrNull<T1, T2>(Dictionary<T1, T2?>?)
Checks whether the dictionary is null or empty.
public static bool EmptyOrNull<T1, T2>(this Dictionary<T1, T2?>? dictionary) where T1 : notnull
Parameters
dictionaryDictionary<T1, T2>The dictionary to check on.
Returns
- bool
True if satisfied, false otherwise.
Type Parameters
T1Any key type.
T2Any value type.
EmptyOrNull<T>(List<T?>?)
Checks whether the list is null or empty.
public static bool EmptyOrNull<T>(this List<T?>? list)
Parameters
listList<T>The list to check on.
Returns
- bool
True if satisfied, false otherwise.
Type Parameters
TAny value type.