IsSubsetOf List extension

I've created  IsSubsetOf List extension based on discussion at http://stackoverflow.com/questions/332973/linq-check-whether-an-array-is-a-subset-of-another

///


  /// Determines whether a System.Collections.Generic.List object is a subset of the specified collection.
  /// http://stackoverflow.com/questions/332973/linq-check-whether-an-array-is-a-subset-of-another
  ///

  ///
  ///
  ///
  public static bool IsSubsetOf(this List coll1, List coll2)
  {
   bool isSubset = !coll1.Except(coll2).Any();
   return isSubset;
  }

This article is part of the GWB Archives. Original Author: Michael Freidgeim

New on Geeks with Blogs