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

Problems with the Workspace

The workspace doesn't seem to be recognising the quotation marks used with string variables. Anytime a string is used, the quotation marks along with the information inside appear as red and when I try to compile the program I get the error message: "error CS1525: Unexpected symbol System', expecting,', ;', or=' "

It doesn't seem to be a mistake in the code that I've written because even if I copy the code directly from the lesson and paste it into my Workspace I get the same error.

Jon Wood
Jon Wood
9,884 Points

I wonder if it's not copying the correct quotation code. Have you tried typing in the " in each place to see if that works?

2 Answers

Steven Parker
Steven Parker
229,732 Points

It could be the wrong type of quote.

The printed lesson material may use word-processor style ("curly") quotes instead of programmer ("straight") quotes.

I know that's the case with most of the challenges. I've often used "cut and paste" to be sure to get correct string responses, but I quickly learned to not cut the quotes themselves.

Jon Wood
Jon Wood
9,884 Points

Ahhh, thanks, Steven! I wasn't sure exactly how to explain it. :)

Thanks for your replies.

It seems like there's only the straight kind of quotation marks on my keyboard(I'm using a MacBook air). I tried copying and pasting different quotation marks from different sources and it doesn't seem to make any difference. I even tried switching over to windows thinking that might produce different quotation marks and that didn't help it either. It's not a huge issue just a minor annoyance. I'll probably just follow along using Visual Studio if I can't figure out what the problem is exactly.

Please let me know if you have any other ideas on what the solution might be. Thanks!

Jon Wood
Jon Wood
9,884 Points

That's weird! The " on my MacBook Pro seems to work just fine.