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 |
Explain anonymous type in c#?
How many dimensions can an array have?
What is typeof c#?
Can you see a loop recorder?
How many catch blocks can be there for a single try block?
Why do we still see so much non-oo code written in c# today?
What?s different about switch statements in C#?
What is the difference between static class and abstract class in c#?
what are ways to debug the code step by step except using breakpoints?
What are value types and reference types?
What are Namespaces?
in object oriented programming, how would you describe encapsulation?