---
title: "How is method overriding different from method overloading?"  
description: "How is method overriding different from method overloading?"  
author: "Pushpendra Singh"  
published: 2010-10-25  
updated: 2020-09-15  
canonical: https://www.mindstick.com/interview/109/how-is-method-overriding-different-from-method-overloading  
category: "c#"  
tags: ["c#"]  
reading_time: 1 minute  

---

# How is method overriding different from method overloading?

When overriding a method, you change the behavior of the method for the derived class. Overloading a method simply involves having another method with the same name within the class.

## Answers

### Answer by Pushpendra Singh

When overriding a method, you change the behavior of the method for the derived class. Overloading a method simply involves having another method with the same name within the class.

### Answer by Pushpendra Singh

When overriding, you change the method behavior for a derived class. \
e.g Clas x\
{\
Virtual void sum(int a)\
{\
}\
}\
\
Class B:x\
{\
public overrid void sum(int a)\
{\
\
}\
}\
\
Overloading simply involves having a method with the same name within the class. \
\
Example for Over loading\
\
Class A\
{\
class b()\
\
{\
\
}\
class b(int a)\
{\
}\
}\
\


---

Original Source: https://www.mindstick.com/interview/109/how-is-method-overriding-different-from-method-overloading

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
