About Virtual functions and their use ?

Answers were Sorted based on User's Feedback



About Virtual functions and their use ?..

Answer / 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

About Virtual functions and their use ?..

Answer / mahesh babu ummaneni

virtual is nothing but it is a keyword ,when we diclare a method with virtual key word in base class thet method must be overroden in derived class

Is This Answer Correct ?    1 Yes 0 No

About Virtual functions and their use ?..

Answer / ssss

Virtual functions are used to override the derived class.If
u r using the virtual keyword u must override the the
derived class

Is This Answer Correct ?    1 Yes 4 No

Post New Answer

More C Sharp Interview Questions

Please explain the basic string operations used in c#?

0 Answers  


What is global namespace in c#?

0 Answers  


What does assemblyinfo.cs consists ?

4 Answers   Microsoft,


the c# keyword .int. Maps to which .net type?

0 Answers   Siebel Systems,


What is data type in c# with example?

0 Answers  






Can the nested class access, the containing class. Give an example?

0 Answers  


Is static thread safe?

0 Answers  


How can you write a class to restrict that only one object of this class can be created (Singleton class)?

0 Answers  


Is c# int immutable?

0 Answers  


what is uniary operators and binary operators and what is the difference

1 Answers   Protech,


Is c# difficult to learn?

0 Answers  


What?s a delegate?

8 Answers   CTS, Visual Soft,


Categories