What is meta? ×
Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 150 Stack Exchange communities.

In this answer, comments in C# code have the same color as normal code. In the preview the highlighting is correct, but not on the submitted answer. Looks like a bug...

share|improve this question
The preview probably does not take the tags into account, so using the default which is "global" and can identify most languages. – Shadow Wizard May 15 '11 at 14:19

1 Answer 1

up vote 7 down vote accepted

Since the question is tagged as vb.net, it doesn't automatically apply C# code formatting. You can override this by adding a special comment before the code block that specifies the highlighting language:

<!-- language: c# -->
share|improve this answer
ah, didn't know that... thanks! – Thomas Levesque May 15 '11 at 14:15
I always thought it needs to be <!-- language: lang-cs --> glad to see there's little shortcut. :) – Shadow Wizard May 15 '11 at 14:17

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .