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 happens when I install the .net framework 3.0? How can I upgrade if I already have the .net framework 2.0 installed?
What is session state management?
What are the 3 segments of the default route, that is present in an ASP.NET MVC application?
mention what is code first approach and model first approach in entity framework?
List the new features added in .net framework 4.0.
Explain the methods used to render the views in mvc?
Where are the routing rules defined in an asp.net mvc application?
What does mvvm mean?
Explain Keep method in Tempdata in ASP.Net MVC?
How we can call a JavaScript function on the change of a Dropdown List in ASP.Net MVC?
How does �side by side� work for the .net framework 3.0?
What is razor code?
how do you query in entity model when the result has a join from from different database other than the entity model?
Is .net core faster than .net framework?
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?