Tag Archives: Comparing arraylists using C#

Compare 2 ArrayLists using C# and tell wether they are same or not

usefull method to compare 2 ArrayLists private bool CompareArrayLists(ArrayList List1, ArrayList List2)    {        if (List1.Count != List2.Count)            return false;         for (int i = 0; i < List1.Count; i++)        {            if (!List1[i].Equals(List2[i]))                return false;        }        return true;    }   Advertisements

Posted in Uncategorized | Tagged , | Leave a comment