Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

C# C# Basics (Retired) Perfect var

It's a bit confusing to me.. any one please help ??

how to change bool to var ?

var input = '22';

var converted = int.Parse(input);

var wheelsAreRound = true;

var downcased = "DoNuTs".ToLower();

var success = (downcased == "donuts");

var total = 0.0;

3 Answers

Steven Parker
Steven Parker
215,356 Points

It's not your bool, that's fine. But why did you change the quotes on the top line to apostrophes? Did you notice how the syntax coloring above no longer shows the "22" in pink like the other strings?

:point_right: Just put the original quotes back around "22".

I tried with both... First "22" and then after I changed it to '22'. . And i'm getting an error near : var wheelsAreRound = true; ???

Audrey Steed
Audrey Steed
1,112 Points

Just restart the challenge.I just completed it with YOU'R code but with the double quotes.