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
Can a constructor have a return type?
Can you inherit multiple classes in c#?
Can you call from an inherited constructor to a specific base constructor if both base class and an inheriting class has a number of overloaded constructors?
Explain how many types of exception handlers are there in .net?
What is event and delegates in c#?
The int maps to which C# keyword in .NET type?
What is asynchronous one-way calls?
what is collections in .net? why we use?
What is difference between internal and protected internal in c#?
What is the difference between proc. Sent by val and by sub?
What is state c#?
How does insertion sort work?
Is c++ or c# better?
What Is An Interface Class?
Hi Friends, I am going through Siemens Interview Procedure from last 1+1/2 months. I went through 1 written + 2 Technical + 1 Managerial Round process after which I got call from HR informing that "you are selected and we would like to meet you for HR round". HR round was very nominal compared to MR. HR Round last for hardly 5 mins. They told me that you will get the final result on Friday. Still I have not received any feedback from them. Please help!!!