I've had this installed for some time, but haven't used it enough. I tend to be very particular about the formatting of code on my site and CopySourceAsHtml written by Colin Coller makes it easy!
Just highlight the code in Visual Studio, choose “Copy as HTML...” from the right-click menu, and paste into the blog entry.
You'll get options for line numbering, word wrap, etc. You can also add additional CSS rules that will be applied to the whole copy, a line, or a block. Just look at these results:
1 using System;
2 using System.Xml.Serialization;
3
4 namespace CardCatalog {
5 [XmlRootAttribute( "catalog", Namespace="", IsNullable=false )]
6 public class Catalog {
7 private Book[] items;
8
9 [XmlElementAttribute( "book" )]
10 public Book[] Items {
11 get { return this.items; }
12 set { this.items = value; }
13 }
14 }
15
16 public class Book ...
67 }
© Copyright 2008 Rich Claussen Theme design by Bryan Bell / Rich Claussen newtelligence dasBlog 1.9.7174.0 | | Page rendered at Wednesday, November 19, 2008 11:35:30 PM (Pacific Standard Time, UTC-08:00) Reset | BlogXP | business | calmBlue | candidBlue | Candid Blue Real | dasBlog | dasblogger | DirectionalRedux | Discreet Blog Blue | Elegante | essence | Just Html | MadsSimple | Mobile | Mono | Movable Radio Blue | Movable Radio Heat | nautica022 | orangeCream | Portal | Project84 | Project84Grass | Slate | Sound Waves | Tricoleur | useit.com | Voidclass2