Determine a weight that represents the class hierarchy difference between types and arguments.
The accumulated weight for all arguments.
A direct match, i.e. type MyInteger -> arg of class MyInteger, does not increase the result - all direct matches means weight zero (0). A match between the argument type Object and a MyInteger instance argument would increase the weight by 1, due to the superclass (Object) being one (1) steps up in the class hierarchy being the last one that still matches the required type.
Therefore, with an argument of type Hashtable, a constructor taking a Hashtable argument would be preferred to a constructor taking an IDictionary argument which would be preferred to a constructor taking an ICollection argument which would in turn be preferred to a constructor taking an Object argument.
All argument weights get accumulated.