3

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>
5

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.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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