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 |
Name the connections does microsoft sql server support?
Can we inherit private members of class in c#?
What is method and function in c#?
Can a class inherit structure.
Define MSIL, and how does it works? Why our developers need an appreciation of it if at all?
What is difference between continue and break in c#?
Can abstract classes be final?
What is the diff between System.String and System.Text.StringBuilder classes?
What does int32 mean?
What is windows form in c#?
What is different between Boxing and Unboxing?
What is concrete method 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)