Easily post VisualStudio formatted source code in your blog

I have posted source code many times before, and always crap-looking. Always wanted to have a copy-paste method to quickly copy source code keeping the format used in Visual Studio. I knew there were tools to do that, but always was too lazy to look for one. Today I did it, and the answer is CSAH: CopySourceAsHtml.

 

It´s a Visual Studio Add-In that offers you a “Copy as HTML” context menu item inside your Visual Studio. You can find it here

 

I have tested it in VStudio 2008, and you can check the results below:

 

 

    public partial class FrmNewDisp : Form

    {

        public FrmNewDisp()

        {

            InitializeComponent();

        }

    }

 

Great!