About Virtual functions and their use ?
Answer Posted / belson gnana pradeep
Virtual methods those can be overridden and replaced by sub classes.
When working with virtual methods keep in mind datatype of
an object is used to determine the implementation of
the method to call, rather than the type of the variable
that refers to an object.
In C#, a base class must provide the "virtual" modifier for
any virtual method, and derived classes must provide the
"override" modifier for any overriden method inherited from
a base class.
In VB.NET, a base class must provide the "Overridable"
modifier for any virtual method, and derived classes may
provide the optional "Overrides" modifier for any overriden
method inherited from a base class
Is This Answer Correct ? | 4 Yes | 0 No |
Post New Answer View All Answers
Are c# destructors the same as c++ destructors?
Can int be null c#?
Explain the difference between // comments, /* */ comments and /// comments?
How do I create a delegate/multicastdelegate?
What is assembly version series sequence?
What is namespace in oops?
How do you prevent a method from being overridden in c#?
What is the use of nullable types in c#?
What is the difference between a field and a property in c#?
What is null propagation c#?
What is the difference between final finally and finalize in c#?
What is the difference between ienumerable and enumerable?
What is interpolation in programming?
What is msil in c#?
What is difference between web and window application?