Wednesday, 23 March 2011

New Features In Visual Studio 2010

A partial list of some of new features in Visual Studio 2010 that I think I will find useful


1) Auto-Implemented Properties
For my database derived code I automatically generate all the properties anyone, but other than that declaring properties with their corresponding Get/Set methods is one of the least exciting tasks. Microsoft have made it easier with auto-implemented properties.
Simply declare the property like this:


   Property ClientID as Integer 


Visual Studio will automatically generate a hidden private member, and Get/Set methods

To make them visible if you need to customise them, for example, to add some validation, then type G or S on the line after the property declaration and VS will show the hidden methods.


2) Reference Highlighting
This will be a feature that I will miss when I work in previous editions of Visual Studio. When you click on a keyword, all instances of it are highlighted.
But much more usefully, when clicking on part of a construction such as a If..Then, all parts of that construction are highlighted. I think that this will be most helpful when working with nested statements.


Some features I am not so sure about:

  • Lambda Expressions - these could make code harder to read, and the time savings over regular functions are minimal.

No comments: