Skip to main content
gamedev.net
🔒 Locked

[.net] C# inheritance

Started by Calin 1 reply 600+ views
Original Post
Calin
Calin
How can I override a function from the inherited class without making it abstract? I want a function definition in both my base and derived classes.
My project`s facebook page is “DreamLand Page”
janoside
janoside
Mark the base class's method "virtual". You can then mark the derived class's implementation as "override" and still call the base class implementation using "base.MethodName()".
-janoside [Firestorm Engine]
Calin
Calin
Thanks!
My project`s facebook page is “DreamLand Page”

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.