Answer Posted / maloy.adhikari
abstract Class: I find a Proper ans there.
So Posting For Overriding.
Method Overriding:
Method overriding occurs when child class declares a method
that has the same type arguments as a method declared by one
of its superclass.
Method overriding forms Run-time polymorphism.
Eg1:
Class Maloy
{
virtual void hello()
{ Console.WriteLine(“Hello from Maloy”); }
}
Class Adhikari: Maloy
{
override void hello()
{ Console.WriteLine(“Hello from Adhikari”); }
}
static void main()
{
parent objmaloy = new Adhikari();
objmaloy .hello();
}
//Output
Hello from Adhikari.
..................
Hope You Understand This.
| Is This Answer Correct ? | 4 Yes | 0 No |
Post New Answer View All Answers
What is needed for running an application built on winfx on the .net framework 3.0?
What is representational state transfer (rest) mean?
What is the difference between partial and renderpartial?
What is work of clr?
What are the Core features of ASP.NET MVC?
How does servicing work for the .net framework 3.0? If I install the .net framework 3.0, can I get service updates for the .net framework 2.0?
what is minimum requirement for entity framework applications to run?
Can we change web.config settings from iis?
Will the name change be reflected in any of the existing .net framework 2.0 apis, assemblies, or namespaces?
What is viewstart page in mvc?
Describe the gac in the .net framework.
what is dot net? what is use dot net? what is benifit of dot net?what is vb dot net? what is ado dot net? what is c#?
Can a view be shared across multiple controllers? If yes, how we can do that?
How the ‘page lifecycle’ of ASP.Net MVC does works?
What is the use of action filters in an mvc application?