Class ICollectionExt
Extension methods for generic collection interfaces.
public static class ICollectionExt
- Inheritance
-
ICollectionExt
- Inherited Members
Methods
AddRange<T>(ICollection<T>, IEnumerable<T>)
Adds the elements of the specified rng to the end of collection col.
public static void AddRange<T>(this ICollection<T> col, IEnumerable<T> rng)
Parameters
colICollection<T>rngIEnumerable<T>
Type Parameters
T
ContentEquals<T>(IEnumerable<T>, IEnumerable<T>)
Compares IEnumerable<T> contents for equality.
public static bool ContentEquals<T>(this IEnumerable<T> seq, IEnumerable<T> other) where T : class
Parameters
seqIEnumerable<T>otherIEnumerable<T>
Returns
Type Parameters
T
ContentEquals<T>(IEnumerable<T>, IEnumerable<T>, IEqualityComparer<T>)
Compares IEnumerable<T> contents for equality.
public static bool ContentEquals<T>(this IEnumerable<T> seq, IEnumerable<T> other, IEqualityComparer<T> cmp) where T : class
Parameters
seqIEnumerable<T>otherIEnumerable<T>cmpIEqualityComparer<T>
Returns
Type Parameters
T
ContentEquals<K, T>(IDictionary<K, T>, IDictionary<K, T>)
Compares IDictionary<TKey, TValue> contents for equality.
public static bool ContentEquals<K, T>(this IDictionary<K, T> dict, IDictionary<K, T> other)
Parameters
dictIDictionary<K, T>otherIDictionary<K, T>
Returns
Type Parameters
KT
ContentEquals<K, T>(IDictionary<K, T>, IDictionary<K, T>, IEqualityComparer<T>)
Compares IDictionary<TKey, TValue> contents for equality.
public static bool ContentEquals<K, T>(this IDictionary<K, T> dict, IDictionary<K, T> other, IEqualityComparer<T> cmp)
Parameters
dictIDictionary<K, T>otherIDictionary<K, T>cmpIEqualityComparer<T>
Returns
Type Parameters
KT
GetOrAdd<T>(ISet<T>, T, IEqualityComparer<T>?)
Gets an exisiting or adds the itm to the ISet<T>.
public static T GetOrAdd<T>(this ISet<T> set, T itm, IEqualityComparer<T>? cmp = null)
Parameters
setISet<T>itmTcmpIEqualityComparer<T>
Returns
- T
Type Parameters
T