I was wondering if anyone could help me understand overloading a bit better.
I'm trying to take the following function, which accepts a Double and returns a Double, and write an overloaded version that accepts an Integer and returns a Single.
So do I just need to change the type of variable that I send to it to Integer and then convert the return to single, or is there something else I need to be changing? I've gone and confused myself again.
I'm trying to take the following function, which accepts a Double and returns a Double, and write an overloaded version that accepts an Integer and returns a Single.
VB.NET:
Private Function ComputeCelsius(ByVal dblFahr As Double) As Double
Dim dblCels As Double
dblCels = 5 / 9 * (dblFahr - 32)
Return dblCels
End Function
So do I just need to change the type of variable that I send to it to Integer and then convert the return to single, or is there something else I need to be changing? I've gone and confused myself again.