Must you `override` when implementing an interface?

P T Withington ptw at
Mon Mar 26 10:27:00 PDT 2007

A reader asks,

> When I implement an interface method, must I specify the `override`  
> attribute?

 From the spec, I see:

> It is an error to define a method without the override attribute if  
> the name matches the name of an inherited method.
> Methods inherited from an interface must be implemented by a method  
> with a name and signature that matches the inherited method.  
> Interface methods are implemented by an instance method declared  
> with the public attribute.
Taken together, I would conclude that the instance method must also  
be declared with the `override` attribute.  Is that the intent?

More information about the Es4-discuss mailing list