Ok so here is my code(i apologize if some of the code wrapped around)
My question is, why is it that no matter what number i try to calculate, the end result is a zero? Im really new to this and im completely stumped. Thanks!
Code:
Public Class Form1
Dim currentValue As String
Dim dblCurrentValue As Double
Dim newValue As Double
Dim dblOldValue As Double
Private Function GetBonus(ByRef dblOldValue) As Double
Dim dblNewValue As Double
dblNewValue = dblOldValue * 1.1
Return dblNewValue
End Function
Private Sub btnCalculate_Click(sender As Object, e As EventArgs) Handles btnCalculate.Click
txtBox.Text = currentValue
Double.TryParse(currentValue, dblCurrentValue)
newValue = GetBonus(dblCurrentValue)
txtBox.Text = newValue.ToString()
End Sub
End Class
Comment