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