Intelligent code snippets, once the domain of third-party refactoring tools, are now available natively in Visual Studio 2005. Intelligent code snippets allow you to write templates that can be used to insert common code into the current code editor. CSharpCorner has a good little article describing code snippets right here.
As an example of what you can do (and because I’m such a nice guy), here is a snippet that you can use to implement singleton behaviour in a brand new class. The way I use it is to create a new, empty class, then insert this snippet. You’ll get a static singleton object, a private constructor, and nice GetInstance method, all with references to the current class name, and with no typing at all. Nice.
The snippet itself shows how you can use the built-in ClassName() function inside the snippet to insert the current classname where required. The other functions that might come in useful are GenerateSwitchCases, ListVariablesOfType, ListEnumVariables, and SimpleTypeName. Get your snippets on!