Public Sub save(ByVal sav As Double)
If sav= 0.0 Then
Console.WriteLine("Is not valid")
Else
mainsave = sav
End If
what I understand that the user will enter the value in textbox , after you check that user did not leave it empty you can use it .
Dim save As Double
If TextBox1.Text = "" Then ' check if the textbox is empty
save = 0.0
MessageBox.Show("Empty Double")
Else
save = Convert.ToDouble(TextBox1.Text) 'if it is not empty convert the string to double and store it in save variable
End If
also you can validate the user's input before you store it in save variable.
I hope that help you
i need sample project using vb.net if u know anything please send me
it is better you open new thread, and i suggest to search here since many ask same thing , Good Luck