Geeks With Blogs

News My Blog has been MOVED to
Michael Freidgeim's OLD Blog My Blog has been MOVED to

I've created  IsSubsetOf List extension based on discussion at

/// <summary>
  /// Determines whether a System.Collections.Generic.List<T> object is a subset of the specified collection.
  /// </summary>
  /// <param name="list"></param>
  /// <param name="listToFind"></param>
  /// <returns></returns>
  public static bool IsSubsetOf<T>(this List<T> coll1, List<T> coll2)
   bool isSubset = !coll1.Except(coll2).Any();
   return isSubset;

Posted on Friday, May 13, 2011 10:09 PM .Net Framework | Back to top

Comments on this post: IsSubsetOf List extension

No comments posted yet.
Your comment:
 (will show your gravatar)

Copyright © Michael Freidgeim | Powered by: