views:

99

answers:

1

In VS2008 (VB.NET) when you type Public Property X As SomeType and press enter, VS auto-generates the rest of that property definition for you.

I would like to be able to customize what VS generates.

Any thoughts on how to go about that? VS must have a template for it somewhere, eh?

Thanks.

+2  A: 

I think that the Property generation uses an inbuilt macro. I haven't found it in the list of sample macros provided with VS. However, you can edit the DefineAProperty.snippet* file to modify it as per your requirement. Personally, though, I would suggest creating your own snippet rather than modifying the pre-installed ones.

Some links to more information/Snippet Editors:

  1. Creating and using Snippets - MSDN
  2. Code snippet editor for VB 2008
  3. Snippet Designer - CodePlex
Cerebrus