Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

What does the keyword virtual mean in the method definition?

Answer Posted / kiran

Even though the function in base class is declared with
virtual keyword, it is not compulsory that the derived
class must override it.
namespace TestNewOverride
{
class MyBaseClass
{
int a;
public virtual int doubleit()
{
return 2 * a;
}
public MyBaseClass()
{
a = 5;
}
}

class MyDerivedClass:MyBaseClass
{
public static void Main()
{

}
}
}

Is This Answer Correct ?    7 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do you declare a variable in c#?

968


Can you inherit multiple abstract classes in c#?

936


Is it true that all c# types derive from a common base class?

1096


What is COM Interoperability?

962


Is a structure a class?

942


Can abstract class instantiated c#?

902


How do I convert a string to an int in c#?

983


Why data types are important in c#?

940


What is ienumerable <> in c#?

902


who is a protected class-level variable available to?

1027


What is iqueryable in c#?

900


how to insert the data from the grid view to database table though button click.pls send the answer to mail id suri1319@gmail.com

1911


What is the ouput of the following program?

977


Explain how to implement an object pool in c#.net

961


What is the difference between console and windows application?

972