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 are Action Filters in ASP.NET MVC and its use?
What is the role of the jit compiler in .net framework?
Explain the advantages of asp.net mvc over asp.net?
What filters are executed in the end?
What is mapping in entity framework? : Entity framework
how can you tell ef to have a different table or column name than that defined for the class?
What is display mode in mvc?
what is way of loading data in ef (entity framework)?
How route table has been created in ASP.NET ASP.Net MVC?
Is it possible to share a view across multiple controllers?
What is meant by domain model?
What is the .net framework and how does it work?
How does the .net framework 3.0 relate to the .net framework 2.0?
Can any particular component of .net framework 3.0 be removed?
What is tempdata?