Method overloading
-
How to access particular method in overloading E.g: 2 overloaded method as follows
Method1(double, double)
Method1(int, int)calling method:
Method1(1,1)
Here from calling function i want to access Method1 with "double". how can we achieve this.
Cast the variables to the expected type, as follows:
Method1((double)1, (double)1);
-
How to access particular method in overloading E.g: 2 overloaded method as follows
Method1(double, double)
Method1(int, int)calling method:
Method1(1,1)
Here from calling function i want to access Method1 with "double". how can we achieve this.
-
How to access particular method in overloading E.g: 2 overloaded method as follows
Method1(double, double)
Method1(int, int)calling method:
Method1(1,1)
Here from calling function i want to access Method1 with "double". how can we achieve this.
-
The OP wanted to call the double version, not the int version.
-
Duh.