AlgorithmsIsProperSubsetOfT Method (IEnumerableT, IEnumerableT) |
Determines if one collection is a proper subset of another, considered as sets. The first set is a proper subset
of the second set if every item in the first set also occurs in the second set, and the first set is strictly smaller than
the second set. If an item appears X times in the first set,
it must appear at least X times in the second set.
Namespace: X3Platform.CollectionsAssembly: X3Platform.Support (in X3Platform.Support.dll) Version: 1.0.0.0 (2.0.0.0)
Syntaxpublic static bool IsProperSubsetOf<T>(
IEnumerable<T> collection1,
IEnumerable<T> collection2
)
public:
generic<typename T>
static bool IsProperSubsetOf(
IEnumerable<T>^ collection1,
IEnumerable<T>^ collection2
)
Parameters
- collection1
- Type: System.Collections.GenericIEnumerableT
The first collection. - collection2
- Type: System.Collections.GenericIEnumerableT
The second collection.
Type Parameters
- T
[Missing <typeparam name="T"/> documentation for "M:X3Platform.Collections.Algorithms.IsProperSubsetOf``1(System.Collections.Generic.IEnumerable{``0},System.Collections.Generic.IEnumerable{``0})"]
Return Value
Type:
BooleanTrue if
collection1 is a subset of
collection2, considered as sets.
Exceptions
RemarksThe 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 IsSubsetOf method on that class.
See Also