I've got an interface say IMyInterface which is implemented by a class MyClass how do I declare properties with getters and setters that override rather than masking the ones in the interface?
For example for the interface:
public interface IMyInterface
{
String MyProperty {get;}
}
If I do this I'm hiding the interface property
public class MyClass : IMyInterface
{
public String MyProperty
{
get
{
return "Whatever";
}
}
}
But if I do this I get an error saying that MyProperty can't be public:
public class MyClass : IMyInterface
{
public String IMyInterface.MyProperty
{
get
{
return "Whatever";
}
}
}