.net 2.0 in VS2008

I attended a user group presentation from Daniel Moth last night on Visual Studio 2008 and .net 3.5. I won't go on about the wonders of .net 3.5 as I'm sure you are well aware of them, but what did take me last night was the backward compatibility of it. I knew that VS2008 supported .net 2.0 and 3.0, but wasn’t aware that I could take advantage of so many new features still using .net 2.0.

I would expect javascript intellisense to be supported and CSS, they aren't anything to do with .net, right!

Did you know however that new syntax candy like this are:

  1. Anonymous Types
  2. Automatic Properties
  3. Extension Methods (http://www.danielmoth.com/Blog/2007/05/using-extension-methods-in-fx-20.html)
  4. Object Initialisers

How? Well in VS2008 there is only 1 compiler, which is the C#3.0 compiler and that is aware of syntax like the above.

 

Print | posted on Tuesday, February 19, 2008 9:27 AM

Feedback

# re: .net 2.0 in VS2008

Left by Anonymous at 3/18/2008 8:50 PM
Gravatar How do you tell VS2008 to use .net 2.0?

# re: .net 2.0 in VS2008

Left by Steve Clements at 3/18/2008 9:13 PM
Gravatar In the top right hand corner of the new project dialog. You can also change .net 3.5 projects bacl to .net 2.0 from the project property pages.

Your comment:





 
 

Copyright © Steve Clements

Design by Bartosz Brzezinski

Design by Phil Haack Based On A Design By Bartosz Brzezinski