If a type has two constructors that take the same number of parameters, it chooses whichever comes first for use in constructor shortcuts.
class Example
{
public Example(int i)
{
}
public Example(string s)
{
}
}
if we try to use ("this is a string") as a shortcut for an Example, there will be an error as it will try to use the int shortcut. What should happen is that if there are multiple constructors with the same number of parameters, it keeps trying them until either there is no error or all constructors have been tried.
If a type has two constructors that take the same number of parameters, it chooses whichever comes first for use in constructor shortcuts.
if we try to use
("this is a string")
as a shortcut for anExample
, there will be an error as it will try to use the int shortcut. What should happen is that if there are multiple constructors with the same number of parameters, it keeps trying them until either there is no error or all constructors have been tried.