<PackageReference Include="Newtonsoft.Json" Version="4.5.10" />

CollectionUtils

static class CollectionUtils
public static bool AddDistinct<T>(this IList<T> list, T value)

public static bool AddDistinct<T>(this IList<T> list, T value, IEqualityComparer<T> comparer)

public static void AddRange<T>(this IList<T> initial, IEnumerable<T> collection)

Adds the elements of the specified collection to the specified generic IList.

public static void AddRange(this IList initial, IEnumerable collection)

public static bool AddRangeDistinct<T>(this IList<T> list, IEnumerable<T> values, IEqualityComparer<T> comparer)

public static IEnumerable<T> CastValid<T>(this IEnumerable enumerable)

public static bool ContainsValue<TSource>(this IEnumerable<TSource> source, TSource value, IEqualityComparer<TSource> comparer)

public static IWrappedCollection CreateCollectionWrapper(object list)

public static IWrappedDictionary CreateDictionaryWrapper(object dictionary)

public static IList CreateGenericList(Type listType)

public static IList CreateList(Type listType, out bool isReadOnlyOrFixedSize)

public static int IndexOf<T>(this IEnumerable<T> collection, Func<T, bool> predicate)

public static int IndexOf<TSource>(this IEnumerable<TSource> list, TSource value, IEqualityComparer<TSource> comparer)

Returns the index of the first occurrence in a sequence by using a specified IEqualityComparer.

public static bool IsDictionaryType(Type type)

public static bool IsNullOrEmpty<T>(ICollection<T> collection)

Determines whether the collection is null or empty.

public static Array ToArray(Array initial, Type type)

public static Array ToMultidimensionalArray(IList values, Type type, int rank)