views:

59

answers:

3

Can I certainly do this ? If this is possible how do we do this ? What language features of C# 4.0 are tightly bound to the CLR of .net 4.0 framework if any? In case if no features are bound to CLR4.0 can we really use C#4.0 in a .Net3.5 application ?

+1  A: 

NO, you can not - you also can not cook a vegetarian steak.

C# 4.0 basically is all about runtime and uses a different set of... assemblies. So, no - you can not. An ASP.NET 3.5 application will have to use the corresponding version of the compiler. THe other way around it works ;)

TomTom
You can cook veggie steaks: http://www.veggiestuff.com/acatalog/viana_cowgirl_veggie_steaks.html ;)
Rowland Shaw
A: 

I guess not, However, if you are using an 4.0 project as a reference in a 3.5 project, try to set the 4.0 to 3.5 in your projectsettings.

SirLenz0rlot
+1  A: 

You cannot use any version later than 3.5 in VS2008.

You can benefit from some of the syntactical enhancements (and other compiler goodness), and still compile as against 3.5 in VS2010 though, which may save having to deploy a newer version of the framework.

Rowland Shaw