I have a generic class in C# with 2 constructors:
public Houses(params T[] InitialiseElements)
{}
public Houses(int Num, T DefaultValue)
{}
Constructing an object using int as the generic type and passing in two ints as arguments causes the 'incorrect' constructor to be called (from my point of view).
E.g. Houses houses = new Houses(1,2) - calls the 2nd construtor. Passing in any other number of ints into the constructor will call the 1st constructor.
Is there any way around this other than removing the params keyword and forcing users to pass an array of T when using the first constructor?