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

What is the functionality of break and continue in Visual Studio?

2 Answers   JPMorgan Chase,


Explain the three services model (three-tier application). Presentation (ui), business (logic and underlying code) and data (from storage or other sources).

0 Answers  


What is the usage of transponders?

0 Answers   Wipro,


What is the CTS, and how does it relate to the CLS?

0 Answers   Arigo Infotech,


How to use session under class file of APP_Code folder?

0 Answers   ADITI,






What are extension methods and where can we use them?

0 Answers  


What?s the difference between an interface and abstract class?

6 Answers   Mind Tree, Siebel,


Explain Constructor and destructor?

0 Answers  


What is extension method in c sharp?

0 Answers  


What is selector c#?

0 Answers  


What is lazy keyword in c#?

0 Answers  


What is sql transaction in c#?

0 Answers  


Categories