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
Can you pass parameters to destructors?
Is c# good for games?
Why do we need escape characters?
What does string format do?
What is dataadapter c#?
Why do you call it a process? What’s different between process and application in .net, not common computer usage, terminology?
What is serializable in c#?
What is the difference between interface and abstract class in c#?
What is uint16?
How to transpose multi-dimensional array?
What is the difference between and xml documentation tag?
What is yield keyword?
What is difference between static and readonly in c#?
What is singleordefault?
How do you declare a method in c#?