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 do you mean by directing?

923


What is data hiding in c#?

852


What is a property in c#?

852


What is out int in c#?

841


Define MSIL, and how does it works? Why our developers need an appreciation of it if at all?

902


How can I check the type of an object at runtime?

911


Is char * null terminated?

878


What exactly happens when we debug and build the program?

2532


What is static variable in c#?

898


When should we use sealed class in c#?

844


Why do we parse in c#?

822


What is the boxing and unboxing in c#?

827


Explain the types of Polymorphism.

1044


Can scriptable objects have methods?

838


Can you inherit from a sealed class?

848