.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal

Home >> Forum >> C# >> Post New QuestionBookmark and Share Subscribe to Forum

what is overriding?

Posted By: PankajGupta     Posted Date: August 05, 2009    Points:2   Category :C#
what is overriding in C#?

Author: Venkat             
Posted Date: August 05, 2009     Points: 5   

The override modifier is required to extend or modify the abstract or virtual implementation of an inherited method, property, indexer, or event.

In below Example the class Square must provide an overridden implementation of Area because Area is inherited from the abstract ShapesClass:

Copy Code abstract class ShapesClass
abstract public int Area();

class Square : ShapesClass
int x, y;
// Because ShapesClass.Area is abstract, failing to override
// the Area method would result in a compilation error.
public override int Area()
return x * y;


Mark As Answer if this solve your problem
Warm Regards,

Post Reply

You must Sign In To post reply
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more Here
Quick Links For Forum Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  OOPs  SilverlightIISJQuery

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend