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

Answers were Sorted based on User's Feedback



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

Answer / aspdev556

class BaseClass
{
public virtual Method(){}
}

class DerivedClass
{
public override Method()
{base.Method();}
}

Is This Answer Correct ?    3 Yes 0 No

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

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

More C Sharp Interview Questions

how to implement a web service in .net

0 Answers  


What do constructors do in c#?

0 Answers  


how can i display crystalreport in button click? am working with VS2005

1 Answers  


Why is c# good for games?

0 Answers  


What is COM Interoperability?

0 Answers   DELL,






What is asynccallback c#?

0 Answers  


What is a thread c#?

0 Answers  


What is xor operation?

0 Answers  


How do you restrict the type which can be used in custom generic?

1 Answers   IBM,


Define sealed classes in c#?

0 Answers  


What is dictionary class in c#?

0 Answers  


How many bytes is a char c#?

0 Answers  


Categories