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...

can it possible to acees the virthual method using the
override method object?
plz give me the example

Answer Posted / javed khan

public class zzz
{
public static void Main()
{
yyy x = new xxx();
x.test();

}
}
class yyy
{
public virtual void test()
{
System.Console.WriteLine("base calss.");
}
}
class xxx : yyy
{
public override void test()
{

System.Console.WriteLine("derived calss.");
base.test();
}
}

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is type checking in c#?

874


List down the differences between public, static and void keywords?

843


What is xslt in c#?

835


What is the .NET collection class that allows an element to be accessed using a unique key?

1090


Can I get the name of a type at runtime?

955


When can a derived class override a base class member?

862


What is an assembly qualified name? Is it a filename? How is it different?

908


If I have more than one version of one assemblies, then how'll I use old version (how/where to specify version number?)in my application?

905


What is difference between continue and break in c#?

921


What is the use of 0 in c#?

966


What is the difference between null and string empty in c#?

869


What does addressof operator do in background ?

970


How would you describe encapsulation in c#?

860


What is an inheritance in c#?

863


What are the features of c#?

889