Right now, I converted all 3 strings into an int, but I'm having trouble converting each string using the Double.TryParse method. I want to use that method instead of int.
I tried using this type of code if (Double.TryParse(value, out number)), but I'm not to sure exactly if this is right.
//Ask the user for height
Console.Write("Please enter the first part of your height in feet:");
string _height = Console.ReadLine();
int _heightVal = Int32.Parse(_height);
//Ask the user for inches
Console.Write("Please enter the second part of your height in inches:");
string _inches = Console.ReadLine();
int _inchesVal = Int32.Parse(_inches);
//Ask the user for pounds
Console.Write("Please enter your weight in pounds:");
string _pounds = Console.ReadLine();
int _poundsVal = Int32.Parse(_pounds);
Double.TryParse.tryparseshould be wrapped in anifwhere you somehow deal with the failure. learn.microsoft.com/en-us/dotnet/api/…Doubleseems like a bad choice for feet and inches. Maybe for weight, but if it is fractional perhaps use decimal.