Hi,
I am trying to create a condition statement. But when executing this block of code I receive an error stating that string to bool conversion cannot be done implicitly.
userInput = Console.ReadLine();
if(userInput = "")
{
userGravity = 9.80d;
Console.WriteLine("Gravity has been defaulted to 9.8 m/s^2");
}
else
{
userGravity = double.Parse(userInput);
}
userGravity = double.Parse(userInput);
Can someone please exaplaim the problem and show me the right way!
Thx.