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
Is datetime a value type in c#?
Is c# a strongly-typed language?
What does an indexer do?
Can I do things in il that I can't do in c#?
Can a abstract class have a constructor?
what are the Disadvantages of vb
Explain acid rule of thumb for transactions in c#.
What is an expression in c#?
What is the c# equivalent of c++ catch (...), Which was a catch-all statement for any possible exception?
Is c# static or dynamic?
What is the difference between int.parse and int.tryparse methods?
What is a console in c#?
What is firstordefault c#?
Is datetime value type c#?
Is cli same as the clr?