开发者

What are the factors to be considered when migrating to an earlier version of C#?

Thus far, I've worked with C# 3.0 for a开发者_C百科ll my applications and I've never worked with C# 2.0. But now I have to work with C# 2.0 for my next project.

  • What are the factors to be considered when migrating to an earlier version of C#?
  • Is it tough to adapt/live with am earlier version?
  • What are the classes/libraries that I'll miss when moving from C# 3.0 to C# 2.0?


Is it that you have to target .NET 2.0, but can compile using 2008 / 2010?

If so, you'll still have all of the features of C# 3.0, including extension methods, lambdas, query comprehensions and implicit typing.

If you download LinqBridge, you'll have that, too.

I'm using this setup for .NET 2.0-targeted shareware app right now. All I really miss for this particular project is WPF. :-)


I would recommend Jon Skeet's C# in Depth, as he starts out with 2.0 then moves onto 3.0 (as I understand it, a new edition is coming that will also cover 4.0). His book divides the different versions of the language nicely and goes into good detail, giving you exactly what you are looking for. I guess in your case just read the book backwards :)


Linq. If you don't use that, it's probably a breeze.


Don't know if you mean 3.0 or 3.5...but it's all going to depend on what language/framework features you're used to using. If you're using anonymous types, WCF, WPF, WF, or LINQ, you're going to have to find alternatives. If you're using lambda expressions, object/collection initializers, implicit variable declaration, and extension methods, then you're going to have to write things slightly differently, but it shouldn't be a huge deal. Aside from that, you should be pretty safe.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜