what are abstract classes? what is overriding?

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


Please Help Members By Posting Answers For Below Questions

How to use Jquery Plugins in ASP.Net MVC validation?

548


Asp.net mvc application, makes use of settings at 2 places for routing to work correctly. What are these 2 places?

629


What is the importance of NonActionAttribute?

612


How we can add the CSS in ASP.Net MVC?

578


What is entity graph? : Entity framework

534






how do you mark a property as required? For example, for a project, the name is a required field.

585


What is the difference between partial and renderpartial?

499


What is objectcontext? : Entity framework

594


What is model first? : Entity framework

542


Explain how to use multiple submit buttons in ASP.Net MVC?

648


What is the difference between entity framework and mvc?

521


Define the core components of an ASP.NET MVC application?

579


Possible ways to prevent xss attacks on mvc application?

575


If I have multiple filters implemented, what is the order in which these filters get executed?

528


what is eager loading?

573