A couple of years ago programmers wrote an application in C#3.0. Recently we decided to reuse these code and try to plug it into a .net Windows applications in C# 2.0. Is it feasible to do this?
Thank you for any info you provide?
Sean
Can we convert C# 3.0 to C#2.0?
3 Answers
Know the answer? Post it. Somebody with the same question will find it here.

VulpesRank #55 · 29.2K reputationPosted Jun 27, 2012, 2:49 PM EDT
If the application made heavy use of these features (notably LINQ), then it will probably be impractical to translate it to C# 2.0 and the only sensible option would be to start again.
Apart from that, a translation should be feasible as C# 3.0 is backwards compatible with C# 2.0.
For a list of the stuff that was introduced in C# 3.0, see here:
http://msdn.microsoft.com/en-us/library/bb308966.aspx
sean li4 reputationPosted Jun 29, 2012, 12:27 PM EDT
VulpesRank #55 · 29.2K reputationPosted Jun 29, 2012, 2:43 PM EDT
For example:
Implicitly typed variables - just replace 'var' with the actual type.
Lambda expressions - replace with anonymous methods which were introduced in C# 2.0.
Object and collection initializers - should be simple to rewrite.
However, anything to do with LINQ (to objects, XML or SQL) will need to be rewritten using 'traditional' code - there's no other way.