---
title: "What is overloading?"  
description: "What is overloading?"  
author: "Om ji mishra"  
published: 2019-10-11  
updated: 2019-10-11  
canonical: https://www.mindstick.com/forum/105410/what-is-overloading  
category: "c#"  
tags: ["c#", "programming language"]  
reading_time: 2 minutes  

---

# What is overloading?

What is overloading?

## Replies

### Reply by Om ji mishra

Overloading is a method of c # by which we can create more than one method of the same name inside a class.

Some important things about overloading method: -

- - We can't use the overloading method in the derived class.
- - We have to put the same name of all methods.
- - We can't put the same signature of all methods.
- - We have to put different parameters in all methods.
- - If we want to put the same parameters in two or more methods then
- - We have to change the numbers of parameters.

Code:-

```
using System;

namespace HelloGeeksApp
{
 class calculator
    {

      static void calc(int c, int d)
      {
        int a=c;
        int b=d;
        int result= a+b;
        Console.WriteLine("Sum = {0}",result);
      }
      static void calc (string a, int b)
      {
        string f=a;
        int s=b;
        Console.WriteLine("Name:- {0}\nID:- {1}",f,s);
      }
      static void calc (int w, double t)
      {
        int e=w;
        double r=t;
        double result = e*r;
        Console.WriteLine("Multiplication= {0}",result);
      }
      static void Main()
      {
        calc(2,2.5);
        calc("Om", 98);
        calc(23,78);
      }
    }
}
```

## Output: -

Multiplication= 5

Name:- Om

ID:- 98

Sum = 101


---

Original Source: https://www.mindstick.com/forum/105410/what-is-overloading

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
