Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How compatible is C# 3.0 code with .NET 4.0

Tags:

c#

.net

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?

like image 253
Kefka Avatar asked May 10 '26 05:05

Kefka


2 Answers

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.

like image 168
Mark Byers Avatar answered May 12 '26 20:05

Mark Byers


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.

like image 26
Reed Copsey Avatar answered May 12 '26 18:05

Reed Copsey



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!