All about Virtual Keyword

·         When we need to override a method of the base class in the sub class, then we give the virtual keyword in the base class method. This makes the method in the base class to be overridable. 
·         Methods, properties, and indexers can be virtual, which means that their implementation can be overridden in derived classes. 
·         You cannot use the virtual modifier with the following modifiers: Static, Abstract, Override
Ebook Download
View all
OOP/OOD
Read by 0 people
Download Now!
Learn
View all