Optimizing Code Snippets

December 13, 2007 00:06 by MartinHN

Code Snippets are a great productivity boost that was introduced in Visual Studio 2005, if I remember right. Code Snippets lets you type a shortcut for a piece of code. I use snippets for properties a lot. I hate writing properties "by hand" - it is much faster with Code Snippets. But since Visual Studio 2008, the default prop shortcut now uses Dynamic Properties - but I still work on some projects that does not support Dynamic Properties. So I changed my default Code Snippets, and added a few other.

First I changed the default prop snippet back to the old property with a backing field. Then I added snippets for a Dynamic Property, Business Object Property (to use with Rockford Lhotka's CSLA architecture) and a ViewState Property. See the code they all produce here:

 

image This boosts productivity even more, and it is a great way to get rid of those lame things you do over and over again...

Download the snippets yourself bellow. Add them to your C:\Program Files\Microsoft Visual Studio 9.0\VC#\Snippets\1033\Visual C# directory, and replace the prop.snippet file when it prompts you.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Technorati Tags:

CodeSnippets.zip (2.29 kb)


Currently rated 5.0 by 3 people

  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Add to: Facebook Add to: Digg Add to: Del.icio.us Add to: Reddit Add to: Furl Add to: Yahoo Add to: Spurl Add to: Google Add to: Technorati

Links: ASP.NET, ASP.NET AJAX, IIS7, Visual Studio, Silverlight, .NET

August 30, 2007 19:40 by MartinHN

Scott Guthrie, has posted some new and great links for some of his technologies. Scott always give a good introduction to new technology as well. He's doing some series on LINQ, and you can find a lot of great tips and tricks, in his ASP.NET 2.0 Tips, Tricks, Recipes and Gotchas series - don't hesitate to leave a comment - he works really hard to answer most of them. Great!


Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Add to: Facebook Add to: Digg Add to: Del.icio.us Add to: Reddit Add to: Furl Add to: Yahoo Add to: Spurl Add to: Google Add to: Technorati

Powered by BlogEngine.NET 1.4.0.0
Theme by Mads Kristensen

About the author

Martin Høst Normark

Senior Frontend Developer at TraceWorks.

View Martin Høst Normark's profile on LinkedIn

Recent comments

Comment RSS

Disclaimer

The opinions expressed herein are my own personal opinions and do not represent my employer's view in  anyway.

© Copyright 2008