If my interface has the signature only for getter such as:
public interface IInterface
{
object Id{get;}
}
So the interface only dictates a public getter for Id on any implemented class now when i have the class :
public class Simple : IInterface
{
object Id
{
get{return something;}
set{ do something else;}
}
}
the compiler complains about the setter as the setter is not defined in the interface. However I didnt dictate anything on the interface contract for a setter; why does the interface insist on the setter on the derived classes ?