Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

Is there a (free of charge) predefined CSS library for C# code formatting available? I want to display my C# <code> blocks in a web page similar to the way it is displayed in visual studio or even Stackoverflow.

<code class="lang-csharp">
//pretty formatted code
</code>
share|improve this question

1 Answer 1

up vote 5 down vote accepted

I use http://alexgorbatchev.com/SyntaxHighlighter/ on my website. It is a JavaScript library that adds syntax highlighting to code blocks on your page. It supports C# as well as most other programming languages.

share|improve this answer
    
+1 - that's an awesome library –  bungeshea Mar 28 '13 at 10:54

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.