Table of Contents

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

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.

EmptyOrNull<T>(List<T?>?)

Checks whether the list is null or empty.

public static bool EmptyOrNull<T>(this List<T?>? list)

Parameters

list List<T>

The list to check on.

Returns

bool

True if satisfied, false otherwise.

Type Parameters

T

Any value type.