I know how to implement a generic interface that inherits form a non generic one, but there's something I do not understand in this process:
Why the non generic interface method must not be declared as public in the class implementing the interfaces?.
An example:
interface InputTestSocket
{
object GetValue();
}
interface InputTestSocket<T> : InputTestSocket
{
new T GetValue();
}
class FloatInputSocketValues : InputTestSocket<float>
{
IFloatConvertable _output;
public void SetConvertable(IFloatConvertable output) { _output = output; }
//If I make this method public it won't compile. Musn't all interfaces be public?
object InputTestSocket.GetValue() { return null; }
public float GetValue() { return _output.ToFloat(); }
}