My C# books are for 3.0, but I'd like to install 4.0 if it won't make any difference with the code. Will it be compatible?
Asked
Active
Viewed 283 times
3 Answers
7
Here is an article with a list of links about breaking changes in .NET 4.0. The links are collected from the answers in this Stack Overflow question.

Community
- 1
- 1

Mark Byers
- 811,555
- 193
- 1,581
- 1,452
3
In general, any feature documented in your book will most likely work, without change, on .NET 4.0. There are some breaking changes in C# 4, but most deal with adding new features (ie: variance) or fixing things that were really "wrong" before, but not caught by the compiler (such as ?? operator changes).
If you're using C# 3.0 features in a "standard" way, they'll work perfectly well in C# 4.

Reed Copsey
- 554,122
- 78
- 1,158
- 1,373
0
It will be compatible, however .NET 4.0 will have many more features not documented in your book.

derek
- 4,826
- 1
- 23
- 26
-
There are breaking changes with .Net 4.0 so you couldn't guarantee it would be compatible. That said, it does install side-by-side so you can continue to run 3.0 code on 3.0 with 4.0 also installed. – Lazarus Apr 20 '10 at 23:01