Years ago I created a tool called Code4Public to convert source code into HTML called. I was using this tool to put nice code snippets in the blog I used to maintain at that time. The tool is able to get the code, apply syntax highlighting to it based on the syntax of the language selected, and then create HTML based on the theme selected (e.g., MSDN theme). I didn’t assign more time on making the tool better and better, as better ways of doing the same task were emerging, and also other by-products of the tool were becoming more interesting at the time; e.
I needed a piece of code to manage list-view controllers. I needed to use ListView controls in the details mode, which automatically sort its contents when I click on the header, and also pastes the content in a tabular format when I press Ctrl+C or Ctrl+Insert on it. So I created the following classes. The code that carries out the sorting stuff when the header is clicked is taken from this following MSDN article.