I write my app in VS 2008 and so use all the fanciful stuffs such as LINQ, object initializers etc. Now can my app run on machines that have only .Net 2.0 runtime, but no .Net 3.5 runtime? .Net 3.5 runtime is a huge download, as all of you might know.
Share
What you can use is for example the var keyword, auto-getters and auto-setters, object initializers. I.e. syntactic sugar that is compiled to 2.0 code.
What you can’t use is functionality that resides in .Net framework 3.0 and 3.5 library. For example LINQ.
You can try for yourself what you can and can’t use by setting target platform in Visual Studio to .Net Framework 2.0. The compiler will complain when you use things from Framework 3.0 and 3.5.
You can use Extension Methods with a little trick: Creating this class to your project
Extension Methods are actually also compiled to 2.0 code, but the compiler needs this class to be defined. Read about it here