intellectually constipated

patrick gallucci's sql server brain drain

vs 2005 code snippets part 3

now for the final step we just need to add our snippet and add our replacements that we defined in the second part of this article. between the code node, paste your snippet. any item that you want to be replaced with the variable that you have defined, just replace the text with your variable (surrounded by $). The header that I use is posted below.
 
 
so when you insert this the filename, summary, date and author will be replaced and visual indicates to show that this text needs your attention.
 
to demonstrate this open a c# code project and right click at the top of the code page. select insert snippet.
 
 
select mysnippets.
 
 
select fileinfo.
 
 
after you select the snippet, the text will be inserted with variable replacements highlighted. you can then tab through each variable and make changes.
 
I hope this has been a good primer to help you get started on code snippet technology in visual studio 2005. I will be following these up with a more detailed article in Developer magazine and I will post the link here shortly.
 
ciao
patrickgallucci
Published Friday, October 07, 2005 12:00 AM by Patrick Gallucci
Filed under: ,

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

No Comments

Leave a Comment

(required) 
(optional)
(required) 

  
Enter Code Here: Required
Submit

About Patrick Gallucci

breathing air

© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Microsoft
Page view tracker