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 |
What is Signature and parameter in overloading ?
What is default class in c#?
what are implementation inheritance and interface inheritance?
Is c# slower than java?
How do you declare a method in c#?
What is a multicast c# delegate?
Is dictionary reference type c#?
What is a predicate in c#?
Can a struct have a default constructor (a constructor without parameters) or a destructor in c#?
How garbage collection deals with circular references.
About multi level and multiple inheritance how to achieve in .net ?
What is array and types of array in c#?
Visual Basic (800)
C Sharp (3816)
ASP.NET (3180)
VB.NET (461)
COM+ (79)
ADO.NET (717)
IIS (369)
MTS (11)
Crystal Reports (81)
BizTalk (89)
Dot Net (2435)
Exchange Server (362)
SharePoint (720)
WCF (340)
MS Office Microsoft (6963)
LINQ Language-Integrated Query (317)
WPF (371)
TypeScript (144)
Microsoft Related AllOther (311)