When we write code such as C# to publish on our blogs or web sites, it’s better to format it using CSS and HTML instead of screen-shot the code. this provides copy and paste functionality.
The best way is to automate the process of formatting the code. Most of forums, blogs and web sites provide some specific tags to format your code, but if no we need to find a work-around to achieve this.
After a quick search on the web I found web site which provides such functionality for C#, VB, T-SQL, ASPX, XML and HTML along with options such as line numbers, alternate line background and embed style-sheet.
You can also download .Net Source Code for this application and extent the functionality. for example I needed to format my code with Inline CSS style.
Also there are some helpful tools such as Markdown