I.e. I just edited Ninject Dynamically Loading a Repository from an Assembly and noticed that there is no syntax highlighting/coloring.

Update: After adding the C# tag to the question, syntax highlighting now works.

  • Yet another good reason to add a language tag to questions... Aug 8, 2011 at 9:57
  • @Cody Gray: not really, since the question is not about the C# language itself. It just happens that the OP used C# (but he could have used VB.NET and hit the exact same problem).
    – M4N
    Aug 8, 2011 at 9:59

1 Answer 1


Code is highlighted depending on the tags associated with it.

Since that question doesn't feature a specific "language" tag or one that allows the interpreted to guess the the fall back is unhighlighted code.

You could add a language specific tag to the question, or have a look at Interface options for specifying language prettify for details on how to make specific code blocks be highlighted with a specific language colouring. The basic rule is:

<!-- language: (language identifier) -->

  • Indeed, adding the C# tag solved it!
    – M4N
    Aug 8, 2011 at 9:43
  • 2
  • Ah ha, that's a much better reference, thanks @Jeff. Favourited for future reference.
    – DMA57361
    Aug 8, 2011 at 9:48
  • Why isn't the HTML comment working? It says it works even if there is no specific tag present, but it doesn't Dec 22, 2013 at 11:37

You must log in to answer this question.

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