C# C# Basics (Retired) Perform Converting Strings to Integers

Angus Eliott
Angus Eliott
3,793 Points

code problem

my code appears to be correct but the code challenge returns the error " Bummer! Did you pass heightInput to int.Parse?"

CodeChallenge.cs
int height;
int.Parse heightInput = height;

1 Answer

Antonio De Rose
Antonio De Rose
20,862 Points
int height;
int.Parse heightInput = height;

//break down the problem, you've been asked to convert heightInput into int and store it into height
//you are case, you have declared height, then assigning the height, which is of no value to
//heightInput, then again which does have errors.

//by the way, you should not, in general modify questions. Does seem like, you have modified
//I would advise you to restart the quiz, once again and have a try.

//hint - you have to assign it to the height, what you have to assign is the heightInput,
//which needs conversion(converting into int), 


//string heightInput = "168";
//int ?????? = ????????;