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 sealed class in c#?

0 Answers  


Is null or empty in c#?

0 Answers  


What does char mean in c#?

0 Answers  


What is difference between gridview and form view?

0 Answers  


Which string method is used for concatenation of two strings in c#?

0 Answers  






What are the return types in c#?

0 Answers  


what is IDisposal interface

0 Answers   Wipro,


What is dictionary collection in c#?

0 Answers  


What?s the difference between the System.Array.CopyTo() and System.Array.Clone()?

3 Answers  


What is the delegates in c#?

0 Answers  


What is cshtml extension?

0 Answers  


Hi!!! my question is how we can apply or do Themes in C#.NET? please any sample or website from where i can get the answer.

1 Answers  


Categories