---
title: "Method Overloading"  
description: "In method overloading method performs the different task at the different input parameters with same method name and in same class.   ExampleTo expl"  
author: "Anonymous User"  
published: 2010-07-17  
updated: 2020-03-04  
canonical: https://www.mindstick.com/articles/82/method-overloading  
category: "c#"  
tags: ["c#"]  
reading_time: 1 minute  

---

# Method Overloading

In method overloading method performs the different task at the different input

parameters with same method name and in same class.

##### Example

To explain the concept of overloading I have created two classes Poly

```
    public class poly    {//these two functions, sum(), are overloaded.        public int sum(int x, int y)        {            return (x + y);        }        public virtual int sum(int x, int y, int z)        {            return (x + y + z);        }    }
```

---

Original Source: https://www.mindstick.com/articles/82/method-overloading

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
