colour coded formatting of code included in posts

colour coded formatting of code included in posts

Old forum URL:

griff posted on Tuesday, October 23, 2012


I've noticed some posts have nice neat colour coded sample code e.g. see...

Need refresher... Rule Across Multiple Properties (jonnybees).

When I include sample code is does not format very well and the type face is not so readable so being able to have have 'pretty format' would be a benefit to all I believe.

Can those who embed the nice neat code enlighten me/us as to what they use - thanks.

JonnyBee replied on Tuesday, October 23, 2012


I use the "Copy Source as HTML" plugin for Visual Studio.

Copy Source As Html-Visual Studio 11

Thanks to Shai Raiten for making this available for VS 2012. 

"In Visual Studio 2010 Microsoft released the Productivity Tools that has the Copy Source Code as Html built in, also there is a CodePlex project - that supports Visual Studio 2005 and 2008.

Because Productivity Tools for Visual Studio 11 Beta isn’t out yet I’ve modified the CopySourceAsHtml project to Visual Studio 11 Beta + Some code changes (Bad performance loading visual studio)."

We will have to wait and see when MS will release this as a productivity tool for VS 2012.

griff replied on Tuesday, October 23, 2012

many thanks..or rather....

private bool ItWorks()

             // Very good 
             var  message = "Thanks for that" ;

Copyright (c) Marimer LLC