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) Prepare and Plan Workspaces

Stefan Kowalski
Stefan Kowalski
117 Points

Color of code

Why my code in workspace does have a different color? For instance "class has blue, program has black, comment has green.

2 Answers

Steven Parker
Steven Parker
229,786 Points

What you are seeing is the result of an editor feature called "syntax highlighting". The editor knows enough about the language to identify certain code elements, and it applies a color to each type to help distinguish them visually.

As you've noticed, keywords are shown in blue, and comments are shown in green. And perhaps you haven't seen it yet, but literal strings are shown in red.

Stefan Kowalski
Stefan Kowalski
117 Points

Thank you for replay. I've formed probably wrong my question because when I've launched my workspce. I have different colors than Jeremy in Video has. In my workspace class is blue in video class is blue, method is blue I video is read.

Steven Parker
Steven Parker
229,786 Points

It's possible that the specific colors changed as part of an editor upgrade that happened since the video was made.