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

Can a constructor have a return type?

0 Answers  


How long does it take to get a loop recorder put in?

0 Answers  


What is the use of list in c#?

0 Answers  


What are the two keywords used to pass a variable by reference in c#?

2 Answers   IBM,


Y go for Interface? What is use of interface?

3 Answers  






What are satellite assemblies? How will you get the different language strings?

0 Answers  


Are tuples mutable c#?

0 Answers  


What are the 3 different types of arrays?

0 Answers  


When static constructor is invoked?

9 Answers   TCS,


Hoe can i connect the table into the c# application?

2 Answers  


Is c# and c sharp same?

0 Answers  


List down the differences between “dispose” and “finalize” methods in c#.

0 Answers  


Categories