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 the difference between ViewData, ViewBag and TempData?
Why to use “{resource}.axd/{*pathinfo}” in routing in mvc?
What is entity graph? : Entity framework
What are actions in mvc?
Which are the important namespaces used in mvc?
What is viewstart page in mvc?
How can you return string result from Action in ASP.Net MVC?
What is the version number for the next version of the .net framework, codenamed �orcas�?
Name a few different return types of a controller action method?
How does the 'page lifecycle' of asp.net mvc works?
How to answer for project questions..?
What is the difference between model view and controller?
What is the full form of sp?
What is meant by viewdata?
What is entity framework in asp net?