Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

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,884 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 ?????? = ????????;