Re: Compare methods

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Peter Morris

    Re: Compare methods

    I would do something like this

    public static bool AreSame(List<st ringlist1, List<stringlist 2)
    {
    if (list1.Count != list2.Count)
    return false;

    var compareList1 = new List<string>(li st1);
    compareList1.So rt();

    var compareList2 = new List<string>(li st2);
    compareList2.So rt();

    for (int index = 0; index < compareList1.Co unt; index ++)
    if (compareList1[index] != compareList2[index])
    return false;

    return true;
    }



    --
    Pete
    ====


Working...