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

What happens when I install the .net framework 3.0? How can I upgrade if I already have the .net framework 2.0 installed?

525


What is session state management?

563


What are the 3 segments of the default route, that is present in an ASP.NET MVC application?

592


mention what is code first approach and model first approach in entity framework?

624


List the new features added in .net framework 4.0.

516






Explain the methods used to render the views in mvc?

547


Where are the routing rules defined in an asp.net mvc application?

542


What does mvvm mean?

546


Explain Keep method in Tempdata in ASP.Net MVC?

563


How we can call a JavaScript function on the change of a Dropdown List in ASP.Net MVC?

556


How does �side by side� work for the .net framework 3.0?

526


What is razor code?

596


how do you query in entity model when the result has a join from from different database other than the entity model?

554


Is .net core faster than .net framework?

547


i just want to write an exam regarding .net?plz give me information about taking a test?where to pay 4 d exam,exam centre?

1808