What are Virtual Methods?

前端 未结 14 616
傲寒
傲寒 2020-11-29 03:02

Why would you declare a method as \"virtual\".

What is the benefit in using virtual?

14条回答
  •  没有蜡笔的小新
    2020-11-29 03:41

    In order to be able to override it in inheriting classes.

    Check out the MSDN entry for the keyword. That explains it more in depth.

提交回复
热议问题