interface - No suitable method found to override c# despite there being one? -



interface - No suitable method found to override c# despite there being one? -

i trying find solution here issue , sense problem little cannot figure out going wrong. telling me rectangle.draw(): no suitable method found override.

public interface shape { void draw(); } //concrete classes implemenet interfaces public class rectangle : shape { public override void draw() { console.writeline(this.gettype().name + "'s within function (generate stuff here) "); } }

the error correct. can override method if nowadays in inherited base of operations class. rectangle class doesn't inherit anything; implements interface "shape".

remove "override" keyword , fine.

c# interface override

Comments

Popular posts from this blog

Delphi change the assembly code of a running process -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -

C++ 11 "class" keyword -