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


Please Help Members By Posting Answers For Below Questions

What is the difference between interface and functional interface?

489


List some of the basic string operation?

499


What does int32 mean?

475


Is string a data type in c#?

489


What is xml serialization and deserialization in c#?

478






What are the Uses of CLR

756


How you will create satellite assemblies?

485


What is the difference between Decorator and Adapter pattern?

525


What is callback method in c#?

487


Is php easier than c#?

492


What is better C# or VB.NET?

528


Define a strong name in .net?

542


Does c# have primitives?

476


How many bytes is a char c#?

485


What is difference between mutable and immutable in c#?

449