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
setHashSet<T>The set to clone.
Returns
- HashSet<T>
Type Parameters
TThe type of the set elements.
Clone<T>(List<T>)
Clones a list.
public static List<T> Clone<T>(this List<T> list)
Parameters
listList<T>The list to clone.
Returns
- List<T>
Type Parameters
TThe type of the list elements.
Clone<T>(SortedSet<T>)
Clones a set.
public static SortedSet<T> Clone<T>(this SortedSet<T> set)
Parameters
setSortedSet<T>The set to clone.
Returns
- SortedSet<T>
Type Parameters
TThe 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
dictionaryDictionary<TKey, TValue>The dictionary to clone.
Returns
- Dictionary<TKey, TValue>
Type Parameters
TKeyTValue