WHAT IS METHOD OVERLOADING?

Sanjay Sharma

Total Post:42

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

    Post:240

    Points:1200
    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;
    }
    }

      Modified On Mar-26-2018 04:30:46 AM

Answer

NEWSLETTER

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