FormatC is a utility that allows you to add syntax highlighting to your C#, Visual Basic, C++, XML, HTML, Transact-SQL or PowerShell source code, so you can publish it on a web page or blog post.

FormatC supports the new features introduced in C# 3.0 and Visual Basic 9.0, including Linq and Visual Basic XML literals.

You can format your source code using the interface on my site and simply copy/paste the results into a webpage or blog post, and customize the highlighting by editing the provided style sheet (or simply keep the default).

The download provided here contains a class library to use in your own application, and also contains the source code.