Beispiel #1
0
        public static int arrComp <T>(T[] a, T[] b, Comparison <T> comp)
        {
            int minlen = Math.Min(a.Length, b.Length);

            for (int index = 0; index < minlen; index++)
            {
                int ret = comp(a[index], b[index]);

                if (ret != 0)
                {
                    return(ret);
                }
            }
            return(IntTools.comp(a.Length, b.Length));
        }