This is called an explicit interface implementation. You do this when you will not (or cannot) expose members to instance members of a particular type, but only make them available through the interface.
The reason the compiler complains about this:
CS0111 The type 'FloatInputSocketValues' already defines a member called GetValue with the same parameters
, , , :
public object GetValue() { return null; }
public float GetValue() { return _output.ToFloat(); }
.
, .
, , , , , :
something.GetValue()
, . , , , , , .
, :
interface ITest
{
object GetValue();
}
public class Test : ITest
{
public object GetValue() { return null; }
public float GetValue() { return 0.0f; }
}