Trace the O/p for a program on inheritance and Polymorphism.
3 classes A,B,C
A with two methods
public virtual SomeMethodA
public virtual SomemoreMethodA
B:A
overide virtual SomeMethodA
C:B
new Method SomeMethodA
override SomeMoreMethodA
main method
{
b new instance of B
b.SomeMethodA
b.SomeMoreMethodA
b1 new instance of C
b1.SomeMethodA
b1.SomeMoreMethodA
}
Answer / payal
call B's SomeMethodA
Call A's SomeMoreMethodA
call C's SomeMethodA
call C's SomeMoreMethodA
| Is This Answer Correct ? | 1 Yes | 0 No |
How?s the DLL Hell problem solved in .NET?
What is use of abstract class in c#?
Is it possible to have different access modifiers on the get/set methods of a property in c#?
What is throw in c#?
Name the connections does microsoft sql server support?
What is assembly version series sequence?
Is array reference type / value type?
What is an iqueryable in c#?
What is class method?
Explain About Virtual functions and their use.
What are object oriented concepts?
How do you concatenate 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)