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
Why we use get set in c#?
Explain the difference between a struct and a class?
Explain namespaces in c#.
Why is it called c sharp?
What is an object pool in .net?
What does dbml mean in texting?
What are the 2 kinds of data type conversions in c#?
What is the lock statement in c#?
Why do we use static methods in c#?
What is dao in c#?
Define satellite Assembly in .NET?
What is the difference between Decorator and Adapter pattern?
What are actions in c#?
What is c# in asp net?
What is an enumerator c#?