Like the blogs of most technologists, this one will contain its fair share of code snippets. Most developers agree the best way to consume source code is with syntax highlighting. The CopySourceAsHtml Add-In for Visual Studio (http://copysourceashtml.codeplex.com/) is the path of least resistance as far as copying and pasting source code to a blog is concerned.

For those of you who shy away from Visual Studio, I've found an online tool for formatting code (http://www.manoli.net/csharpformat/) that is quite nice. The stylesheet can be customized to the color scheme you find most appealing. Since most of my readers are likely to be .NET developers, I've put together a VS-like color scheme below:

.csharpcode, .csharpcode pre
{
    font-size: small;
    color: black;
    font-family: Consolas, "Courier New", Courier, Monospace;
    background-color: #ffffff;
}

.csharpcode pre { margin: 0em; }

.csharpcode .rem { color: #008000; }

.csharpcode .kwrd { color: #0000ff; }

.csharpcode .str { color: #A31515; }

.csharpcode .op { color: #0000c0; }

.csharpcode .preproc { color: #cc6633; }

.csharpcode .asp { background-color: #ffff00; }

.csharpcode .html { color: #800000; }

.csharpcode .attr { color: #ff0000; }

.csharpcode .alt 
{
    background-color: #f4f4f4;
    width: 100%;
    margin: 0em;
}

.csharpcode .lnum { color: #606060; }

Hopefully, the syntax highlighting on this blog will make my samples easy to consume.