I have the following problem:
There are several color interfaces with a base interface IColor.
public interface IColor { }
public interface IColor3 : IColor { }
public interface IColor4 : IColor { }
Some algorithms support processing only on some color types:
public static Image<TColor, byte> Bla<TColor>(this Image<TColor, byte> img, bool inPlace = true)
where TColor : IColor4
{
//do something
}
public static Image<TColor, byte> Bla<TColor>(this Image<TColor, byte> img, bool inPlace = true)
where TColor : IColor3
{
//do something
}
When I try to compile I get an error that a function with the same parameters is already defined. How can I resolve this ?