Kefka
Kefka

Reputation: 1705

How compatible is C# 3.0 code with .NET 4.0

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?

Upvotes: 3

Views: 295

Answers (3)

Reed Copsey
Reed Copsey

Reputation: 564791

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.

Upvotes: 3

derek
derek

Reputation: 4886

It will be compatible, however .NET 4.0 will have many more features not documented in your book.

Upvotes: 0

Mark Byers
Mark Byers

Reputation: 838984

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.

Upvotes: 7

Related Questions