Exemplo n.º 1
0
        public static int CompareConstructors(Type type, ConstructorInfo lhs, ConstructorInfo rhs)
        {
            int c = CompareBool(lhs.IsStatic, rhs.IsStatic);

            if (c != 0)
            {
                return(c);
            }
            c = CompareBool(lhs.DeclaringType != type, rhs.DeclaringType != type);
            if (c != 0)
            {
                return(c);
            }
            c = lhs.GetAccessModifier().CompareTo(rhs.GetAccessModifier());
            if (c != 0)
            {
                return(c);
            }
            c = CompareBool(lhs.IsAbstract, rhs.IsAbstract);
            if (c != 0)
            {
                return(c);
            }
            return(lhs.Name.CompareTo(rhs.Name));
        }