AlgorithmsSetUnionT Method (IEnumerableT, IEnumerableT) |
Namespace: X3Platform.Collections
public static IEnumerable<T> SetUnion<T>( IEnumerable<T> collection1, IEnumerable<T> collection2 )
[Missing <typeparam name="T"/> documentation for "M:X3Platform.Collections.Algorithms.SetUnion``1(System.Collections.Generic.IEnumerable{``0},System.Collections.Generic.IEnumerable{``0})"]
Exception | Condition |
---|---|
ArgumentNullException | collection1 or collection2 is null. |
When equal items appear in both collections, the returned collection will include an arbitrary choice of one of the two equal items.
The default sense of equality for T is used, as defined by T's implementation of IComparable<T>.Equals or object.Equals.
If both collections are Set, Bag, OrderedSet, or OrderedBag collections, it is more efficient to use the Union or UnionWith methods on that class.