Friday, August 26, 2005

Code Snippets in Whidbey Beta 2

.NET Beta 2.0 now has this auto completion for common code blocks like 'if', 'try' , 'for', 'while' etc. All you have to do is type the first few words and press tab twice, first to confirm the keyword and then to type out the remaining code block.

example type try -> select try from the intellisense list by hitting tab and hit the tab key again to generate the whole try catch code block.

The code snippets can also be generated by selecting the "Insert Snippet..." option in the text editor context menu. This has lots more code snippets and one of my favourites is the property snippet. Select a type and a variable name and choose the prop snippet from the "Insert Snippet..." option, Voila you get a complete property,
Now isnt that cool .

0 Comments:

Post a Comment

<< Home