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
How to use Jquery Plugins in ASP.Net MVC validation?
Asp.net mvc application, makes use of settings at 2 places for routing to work correctly. What are these 2 places?
What is the importance of NonActionAttribute?
How we can add the CSS in ASP.Net MVC?
What is entity graph? : Entity framework
how do you mark a property as required? For example, for a project, the name is a required field.
What is the difference between partial and renderpartial?
What is objectcontext? : Entity framework
What is model first? : Entity framework
Explain how to use multiple submit buttons in ASP.Net MVC?
What is the difference between entity framework and mvc?
Define the core components of an ASP.NET MVC application?
Possible ways to prevent xss attacks on mvc application?
If I have multiple filters implemented, what is the order in which these filters get executed?
what is eager loading?