Tutorial :Modify VB property template in VS2008



Question:

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.


Solution:1

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

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »