Tuesday, 26 January 2010

Syntax Highlighter for C#, XML, SQL and More

I used SyntaxHighlighter before on my last blog and it is perfect for putting snippets of code up with your blog posts. Looks like its come on a treat too and even offers hosted source files for those of us without access to file hosting (and those of us too lazy). Would like to see them using a CDN for the hosted files though - maybe the Amazon S3 service.

Plugging the highlighter couldn't be easier, just refererence a few CSS and JS files. There's a quick explanation here of getting the hosted version working on your blog.

Example using syntax highlighter...

string output = "SyntaxHighlighter is brillo!";

// Tell the world...
Console.WriteLine(output);

1 comment: