Can anyone help me solve this, i am trying to read the value of Console.Readline into a varible declared as Double using vb 2008. As shown below:
Private Sub ReadQuantity() ' Read ask customer to input many liters Private quantity As Double Console.Write("How many liters (only whole liters please ") "? ") Console.ReadLine() quantity = Double.Parse(Console.ReadLine()) quantity = Convert.ToDouble(Console.ReadLine())
I tried both coversion function above but got FormatException errors. Is there a way around this or can i use a different approach.