Just stumbled across some pretty cool functionality with Jet Brains ReSharper 4.0 (you may already be familiar with it, but who cares, it’s still cool!)
Basically, ReSharper has a Surround With tool that allows you to surround a selection of code with… more code. It comes with a bunch of predefined templates, like if..else, using, while, try..catch blocks, but you can edit existing templates and also create and organize your own custom templates.
To get to the Templates Explorer, select ReSharper > Live Templates… from the file menu. Select the Surround Templates tab. Once you’re in there, click on the New Template icon and a new File will open in the IDE, and filled by default with the text $SELECTION$. This is the code selection that will be wrapped when your template is applied. Below is a cap of a sample wrapper with some sample template code.
To apply the template, highlight your code selection
Select ReSharper > Code > Surround With… from the File menu (or CTRL + E, U).
Choose More… from the menu. Find your template in the dialog and click OK.
When your template is applied, your selection will be replaced with the wrapped text, like below.
This is just the basic stuff. You can categorize your templates, choose which language they will apply to, add them to the quicklist (so they get assigned a quick key), and a whole bunch of other stuff that can be found on the ReSharper help pages.