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
Answer / aspdev556
class BaseClass
{
public virtual Method(){}
}
class DerivedClass
{
public override Method()
{base.Method();}
}
Is This Answer Correct ? | 3 Yes | 0 No |
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 |
Can a constructor have a return type?
How long does it take to get a loop recorder put in?
What is the use of list in c#?
What are the two keywords used to pass a variable by reference in c#?
Y go for Interface? What is use of interface?
What are satellite assemblies? How will you get the different language strings?
Are tuples mutable c#?
What are the 3 different types of arrays?
When static constructor is invoked?
Hoe can i connect the table into the c# application?
Is c# and c sharp same?
List down the differences between “dispose” and “finalize” methods in c#.