Beispiel #1
0
    public static void Main()
    {
        MethodOverloading mol = new MethodOverloading();

        mol.Add(10, 20, 30);
        mol.Add(40, 50, 50.5F);

        int sum = 0;

        mol.Add(60, 70, sum);
    }
 void Start()
 {
     myClass.Add(1, 2);    //If i pass in numbers the first method will run
     myClass.Add(1, 2);    //If i pass in string the second method will run
 }