Code Expansion in VS.NET Whidbey - Good as QuickCode.NET?

I’ve been a big fan of QuickCode.NET since it first came out. At $29 a pop, well worth it for the amount of typing it saves me when coding. I have code expansion templates defined for common/tedious tasks such as defining type safe collection classes, adding event accessors to classes to encapsulate event members in C#, and even simple starter chunks of code like adding the block of code to declare an OpenFileDialog and check the return result before accessing the FileName property. I’d much rather type about 10 characters to do that than several lines of code, even with intellisense to help out with each of those lines.

For example, with QuickCode and one of my templates, I can type the following:

coll CustomerALT-Q

and I get a fully implemented type safe collection class with all the Add, Remove, IndexOf, Indexer, etc. members defined on it to only take Customer objects and store them through the CollectionBase class.

Likewise I can type

evtacc EventHandler MyEventALT-Q

And I get a member delegate of type EventHandler and a C# event accessor encapsulating it properly and exposing it as an event named MyEvent.

QuickCode has a nice little editor and runs within VS.NET as an Add-in, and lets you manage the individual templates and copy them to the clipboard as XML and import them from an XML file. You can also add modifiers to the template to help with camel or Pascal casing the emitted variables. All very sweet and easy to work with.

If you use QuickCode.NET and want me to send these to you by the way, just send me an email at

Now (unfortunately for the vendor of that product), there will be Code Expansion as part of the refactoring support in VS.NET Whidbey. I like the idea of having it integrated with the other refactoring features in Whidbey, and it will be extensible to allow you to define your own expansions through XML files.

I haven’t had a chance to use the code expansions a lot in Whidbey yet, and don’t know what the final UI will be like for activating them and defining custom templates. Right now the templates all sit in a single XML file down under the VC#\ExTemplates folder, and as far as I can tell, there is no UI for defining your own. I don’t know if this will change. If not, I guess the third party vendors still have an opportunity to add value by providing a nice UI for editing the templates and maybe import and export them for backup purposes (which I have found very important with QuickCode for when I rebuild my machine – a regular occurrence).

On one hand I like it when features like this are incorporated into VS.NET because I don’t have to go locate and buy a bunch of additional tools once the product comes out to become fully productive in the environment. On the other hand, it is a little bit of a shame to see nice little niche’s that vendors have filled with a product evaporate from under them.

As long as the implementation in VS.NET is as good or better, I’ll be happy in the long run. But the jury is still out until I see what the final surrounding support set is.