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

Can you inherit multiple abstract classes in c#?

494


What is difference between ilist and list in c#?

484


What are concrete classes?

490


What is argument in c#?

519


Is linkedhashset synchronized?

572






Is there throws keyword in c#?

491


Is void a class?

483


Which .gang of four. Design pattern is shown below?

498


What are the uses of namespaces?

604


Is c# good for games?

478


Which function is the entry point for a DLL in MS Windows 3.1?

681


Explain the difference between private and shared assembly?

458


What is throw in c#?

518


What is the value which is accepted by all data types ?

520


What is parseexact c#?

534