Пример #1
0
        /// <summary>
        /// 比较两个不为空的 object 数组是否相等
        /// </summary>
        public static bool isSameValueArray(object[] a, object[] b)
        {
            if (a == null || b == null)
            {
                return(false);
            }
            if (a.Length != b.Length)
            {
                return(false);
            }

            int length = a.Length;

            for (int i = 0; i < length; i++)
            {
                if (!CompareUtils.isSameObject(a[i], b[i]))
                {
                    return(false);
                }
            }

            return(true);
        }
Пример #2
0
        /// <summary>
        /// 比较两个不为空的 IList<object> 是否相等
        /// </summary>
        public static bool isSameValueIList(IList <object> a, IList <object> b)
        {
            if (a == null || b == null)
            {
                return(false);
            }
            if (a.Count != b.Count)
            {
                return(false);
            }

            int length = a.Count;

            for (int i = 0; i < length; i++)
            {
                if (!CompareUtils.isSameObject(a[i], b[i]))
                {
                    return(false);
                }
            }

            return(true);
        }