C# and XML support the Edit.SurroundWith command that will insert the desired snippet around the selected code (whether it is just a selected word, selected line, or entire function)
The keyboard shortcut is Ctrl+K, Ctrl+S.
Technorati tags: VS2005Tip, VS2008Tip