Table of Contents

Class GeneralCollectionExtensions

Namespace
Garyon.Extensions
Assembly
Garyon.dll

Provides general collection extensions.

public static class GeneralCollectionExtensions
Inheritance
GeneralCollectionExtensions
Inherited Members

Methods

Clone<T>(HashSet<T>)

Clones a set.

public static HashSet<T> Clone<T>(this HashSet<T> set)

Parameters

set HashSet<T>

The set to clone.

Returns

HashSet<T>

Type Parameters

T

The type of the set elements.

Clone<T>(List<T>)

Clones a list.

public static List<T> Clone<T>(this List<T> list)

Parameters

list List<T>

The list to clone.

Returns

List<T>

Type Parameters

T

The type of the list elements.

Clone<T>(SortedSet<T>)

Clones a set.

public static SortedSet<T> Clone<T>(this SortedSet<T> set)

Parameters

set SortedSet<T>

The set to clone.

Returns

SortedSet<T>

Type Parameters

T

The type of the set elements.

Clone<TKey, TValue>(Dictionary<TKey, TValue>)

Clones the dictionary and returns a shallow copy of it.

public static Dictionary<TKey, TValue> Clone<TKey, TValue>(this Dictionary<TKey, TValue> dictionary) where TKey : notnull

Parameters

dictionary Dictionary<TKey, TValue>

The dictionary to clone.

Returns

Dictionary<TKey, TValue>

Type Parameters

TKey
TValue