May I know what is the difference between C# 4.0 and C# 2.0? Is C# 4.0 backward compatible to C# 2.0?
Can I say that C# 4.0 is a superset of C# 2.0 (just like what C++ is to C)?
Thanks.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
C# 4.0 is nearly backwards compatible with previous versions but there are a few breaking changes. For most ordinary code you won’t notice these breaking changes.
For the new features in C# 4 you can check out the Wikipedia article which has quite a good summary with examples. The key points are:
Also remember that there was another version in between – C# 3.0. One of the most important additions here is LINQ and all the features added to make it possible. The difference between C# 2.0 and 3.0 is much greater than the difference between C# 3.0 and 4.0.
By the way, not all valid C code is valid C++ as you implied in your question. See here: