比较两个ArrayList是否相同

    技术2022-05-20  47

    bool getIsStringsEqual(ArrayList str1, ArrayList str2)        {            if(str1.Count==str2.Count)            {                foreach (object str in str1)                {                    if (!str2.Contains(str))                        return false;                 }

                  foreach (object str3 in str2)                {                    if (!str1.Contains(str3))                        return false;                }                return true; 

                }            else                return false;                  }


    最新回复(0)