Example #1
0
        private static void AddConstructor(List <ConstructorBuilderInfo> /*!*/ ctors, ConstructorBuilderInfo /*!*/ ctor)
        {
            int existing = ctors.FindIndex((c) => c.ParameterTypes.ValueEquals(ctor.ParameterTypes));

            if (existing != -1)
            {
                if (ctors[existing].Adjustment > ctor.Adjustment)
                {
                    ctors[existing] = ctor;
                }
            }
            else
            {
                ctors.Add(ctor);
            }
        }
Example #2
0
 private static void AddConstructor(List<ConstructorBuilderInfo>/*!*/ ctors, ConstructorBuilderInfo/*!*/ ctor) {
     int existing = ctors.FindIndex((c) => c.ParameterTypes.ValueEquals(ctor.ParameterTypes));
     if (existing != -1) {
         if (ctors[existing].Adjustment > ctor.Adjustment) {
             ctors[existing] = ctor;
         }
     } else {
         ctors.Add(ctor);
     }
 }