IList contains All elements from ICollection - CSharp System.Collections.Generic

CSharp examples for System.Collections.Generic:IList

Description

IList contains All elements from ICollection

Demo Code


using System.Collections;
using System;//w  ww.j  a  va2  s . com

public class Main{
    public static bool containsAll(IList set, ICollection coll)
      {
         foreach (object item in coll)
         {
            if (!set.Contains(item))
               return false;
         }
         return true;
      }
}

Related Tutorials