Table of Contents

Method NotEmptyAndNotNull

Namespace
DisCatSharp.Common
Assembly
DisCatSharp.Common.dll

NotEmptyAndNotNull<T1, T2>(Dictionary<T1, T2?>?)

Checks whether the dictionary is not null and not empty.

public static bool NotEmptyAndNotNull<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.

NotEmptyAndNotNull<T>(List<T?>?)

Checks whether the list is not null and not empty.

public static bool NotEmptyAndNotNull<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.