Any idea on how to check whether that list is a subset of another?
Specifically, I have
List t1 = new List { 1, 3, 5 };
L
Building on the answers from @Cameron and @Neil I wrote an extension method that uses the same terminology as the Enumerable class.
///
/// Determines whether a sequence contains the specified elements by using the default equality comparer.
///
/// The type of the elements of source.
/// A sequence in which to locate the values.
/// The values to locate in the sequence.
/// true if the source sequence contains elements that have the specified values; otherwise, false.
public static bool ContainsAll(this IEnumerable source, IEnumerable values)
{
return !values.Except(source).Any();
}