Possible Duplicate:
Ambiguous call between two C# extension generic methods one where T:class and other where T:struct
I've this two functions :
public static Degrees Convert<TInput>(this TInput input)
where TInput : NumericValue, IDegreesBased, new()
{
//Some stuff
}
public static SquarredMeters Convert<TInput>(this TInput input)
where TInput : NumericValue, ISquarredMetersBased, new()
{
// Some stuff
}
When I call new SquarredKilometers(10).Convert()
, there is an error saying that the call is ambiguous between the two functions above. The SquarredKilometers
class implements the ISquarredMetersBased interface.
EDIT : So it seems to be normal. Any workaround for this precise problem ? (Interface implementation)
Your function signatures are identically - this can not work.
Try implementing your Interfaces explicit.