WHAT IS METHOD OVERLOADING?

Sanjay Sharma

Total Post:42

Points:210
Posted by  Sanjay Sharma
C# 
C#
 1423  View(s)
Ratings:
Rate this:
  1. Pushpendra Singh

    Post:241

    Points:1205
    What is Method Overloading?

    Method overloading means having two or more methods with the same name but different signatures in the same scope. Compiler automatically select the most appropriate method based on the parameter supplied.

    public class multiplynumber

    {

    public int multiply(int x, int y)

    {

    return x * y;

    }



    public int multiply(int x, int y, int z)

    {

    return x*y*z;

    }

    }

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!