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 do you implement multiple inheritance in .NET?
What is the difference between dictionary and hashtable in c#?
What is jit (just in time)?
What are the 2 broad classifications of fields in c#?
What is data type c#?
what is a destructor?
how to print invert pyramid in c#
What is exe file in c#?
hi , how could i analyse a text the user added on a site to look for some words like "car" "shouffere" .. and then i can use that information in addition to other information to make a decision about the adds im going to to show on the site.
What is a reference type c#?
How do you escape in c#?
What are delegate methods?