Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

C# - What will I miss if I start with .NET 2.0?

Tags:

c#

I got a book named "Pro C# 2005 and the .NET 2.0 Platform, Third Edition by Andrew Troelsen". I am wondering whether I should buy the "Pro C# 2010 and the .NET 4 Platform, Fifth Edition" instead. Since, the latest version of .NET is 4.0. If I learn C# based on this old book, do I miss some critical parts of the C# language? Or, I can start with this book and learn new .NET 4.0 features with other resources.

Thank you

like image 630
q0987 Avatar asked Sep 11 '25 01:09

q0987


2 Answers

You can start with that book and learn C# 4.0 from elsewhere. This is what's been added after C# 2.0:

C# 3.0:

  • LINQ
  • lambdas
  • extension methods
  • expression trees
  • anonymous types
  • local type inferencing
  • automatic properties
  • object initializers
  • collection initializers
  • partial methods

C# 4.0

  • dynamic member lookup
  • covariant and contravariant generic type parameters
  • optional parameters and named arguments
  • parallelization framework (actually part of .NET 4, not C# 4.0 per se)
like image 163
Mark Cidade Avatar answered Sep 12 '25 16:09

Mark Cidade


You will miss a lot. Most notably in my opinion, Linq. Linq changes the whole face of idiomatic C# so much that I could not reccommend starting with the old book.

like image 27
recursive Avatar answered Sep 12 '25 14:09

recursive