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

I don't get the question verry well..

I don't realy understand how i need to do it

CodeChallenge.cs
int height = int.Parse("168");

3 Answers

You are going right, you already solved the problem. Mind the variable name :) .

string heightInput = "168";
int height = int.Parse( heightInput);

As Krishna said in her answer, the variable name is important to pay close attention to. The challenge asked for you to use int.Parse, and you did. Then you are told to assign the value to height, which Krishna's code does excellently.

Hi Hugh, I am sorry, but I am not sure that I understand the situation here. Are you asking some question or are you answering the question.

Hence its a good practice to select the answer or close the question to avoid such situations. Which treehouse dont promote enough and neither does the treehouse have the option to close the answer.