virtual methods?

Squeek3018

New member
Hey all, i'm trying to figure out the difference between a virtual method and an abstract method in c#...

If I understand correctly, a virtual method in the base class can be modifidied in a derived class by simply using the same method signature and by adding override. On the other side, an abstract method in the base class has only the signature and no code inside. You can after write the code in the derived class by writting the same signature and add code inside the method.

So it does the same thing?
 
IIRC... A virtual method has the body implemented but can be overridden and an abstract method has no body...
 
Last edited:
Back
Top