DataSharp/Mathematics/SetHelper.cs
/// <summary>
/// Returns true if there is a set in the input collection that contains exact same elements with the input set.
/// </summary>
/// <remarks>
/// This method is suitable for the SortedSet&lt;T> class.
/// </remarks>
/// <typeparam name="T">The type of elements in the set.</typeparam>
/// <param name="collection">The collection that contains ISet&lt;T> instances.</param>
/// <param name="set">The specified set.</param>
/// <returns>true if there is a set in the input collection that contains exact same elements with the input set.</returns>
Returns true if there is a set in the input collection that contains exact same elements with the input set.
Returns true if there is a set in the input collection that contains exact same elements with the input set .
public static bool ContainsSet<T>(IEnumerable<SortedSet<T>> collection, ISet<T> set)
        {
            foreach (ISet<T> s in collection)
            {
                if (s.SetEquals(set))
                    return true;
            }
            return false;
        }
public static bool ContainsSet < T > ( IEnumerable < SortedSet < T > > collection , ISet < T > set ) { foreach ( ISet < T > s in collection ) { if ( s . SetEquals ( set ) ) return true ; } return false ; }
Returns true if there is a set in the input collection that contains exact same elements with the input set.
Returns true if there is a set in the input collection that contains exact same elements with the input set .
// Remarks : // This method is suitable for the SortedSet<T> class.
true if there is a set in the input collection that contains exact same elements with the input set.
true if there is a set in the input collection that contains exact same elements with the input set .
collection
IEnumerable<SortedSet<T>>
The collection that contains ISet instances.
The collection that contains ISet instances .
set
ISet<T>
The specified set.
The specified set .
remarks
This method is suitable for the SortedSet class.
This method is suitable for the SortedSet class .
typeparam
The type of elements in the set.
The type of elements in the set .