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) Perfect var

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

how to change bool to var ?

CodeChallenge.cs
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
229,608 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.