Source Code Formatting

When I decided to set up this blog, the first thing I thought was: “how am I going to format my c# code blocks on the web?”. After some googling, I found this really nice site that, apparently, did just what I needed. It formats c#, vb, html and even t-sql. The only drawback for me is that it uses CSS classes. WordPress and other free blogs do not support that.

Thankfully, the author had posted the source code, so I tweaked it a little bit and created a simple windows app to format the code without CSS classes.

Here’s a screenshot:

And here’s a proof it works:

using System; 
using System.Collections.Generic; 
using System.Text; 
using System.Web.UI; 
using System.Web.UI.WebControls;           

namespace Common 
    /// <summary> 
    /// Comments here 
    /// </summary> 
    public class FieldManager 
        private Dictionary<string, Field> _controlList; 
        public FieldManager() 
            _controlList = new Dictionary<string, Field>(); 

If you like it, get the source files here.

Hope this helps,



No comments yet

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: