Quantcast
Channel: Programming Forums
Viewing all articles
Browse latest Browse all 51036

C# Parse question

$
0
0
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 :)

Viewing all articles
Browse latest Browse all 51036

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>