Hello!
I'm having trouble converting input from a text box to a double. I tried two different ways to code and I get errors (invalid arguments) for both ways. I know I'm headed in the right direction.. where am I off? I underlined where I'm getting the errors.
[ private void btnVolumeCalculate_Click(object sender, EventArgs e)
{
// Convert text input to double data type
// Radius Input
double Radius;
Radius = int.Parse(txtBoxRadiusInput);
// Height Input
string.Height = txtBoxHeightInput.Text;
double HeightNumber = double.Parse(Height);
// Math calculations to follow
]
Thank you in advance for any nudges in the right direction!
Newbie to coding,
Bethany
I'm having trouble converting input from a text box to a double. I tried two different ways to code and I get errors (invalid arguments) for both ways. I know I'm headed in the right direction.. where am I off? I underlined where I'm getting the errors.
[ private void btnVolumeCalculate_Click(object sender, EventArgs e)
{
// Convert text input to double data type
// Radius Input
double Radius;
Radius = int.Parse(txtBoxRadiusInput);
// Height Input
string.Height = txtBoxHeightInput.Text;
double HeightNumber = double.Parse(Height);
// Math calculations to follow
]
Thank you in advance for any nudges in the right direction!
Newbie to coding,
Bethany