Jump to content

  • Log In with Google      Sign In   
  • Create Account

Interested in a FREE copy of HTML5 game maker Construct 2?

We'll be giving away three Personal Edition licences in next Tuesday's GDNet Direct email newsletter!

Sign up from the right-hand sidebar on our homepage and read Tuesday's newsletter for details!


We're also offering banner ads on our site from just $5! 1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


C# need expert advices


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
8 replies to this topic

#1 _Patrick_   Members   -  Reputation: 129

Like
0Likes
Like

Posted 19 July 2012 - 06:06 PM

Is it a mistake to learn C# 2.0 before C# 4.0 ?

I am asking this because I have a few C# books and I prefer to start with the way they teach it in Visual C# How to Program 2005 from Deitel Deitel the way they explains everything... I have others books like Beginning Visual C# 2010 from Wrox and Pro C# Apress...

So is it a mistake will I miss the new features or learn bad habits ??? stuffs like :

.Implicitly Typed Local Variables and Arrays .Object Initializers .Collection Initializers .Extension Methods .Anonymous Types .Lambda Expressions .Query Keywords .Auto-Implemented Properties .Partial Method Definitions .Named and Optional Parameters .Dynamic Support .Variance .COM Interop etc


Also some advanced programmers told me I didn't want to be a .Net programmer today because of windows 8 is coming with the Metro apps sdk who changes everything with xaml, html5 and all that etc they told me to go study at dev.windows.com instead because they believe .Net is going away with time is that true ??


thank you very much



Sponsor:

#2 Nypyren   Crossbones+   -  Reputation: 4497

Like
0Likes
Like

Posted 19 July 2012 - 06:36 PM

As long as you NEVER use the untyped collections (ArrayList, HashTable) that came out in C# 1.0, you won't learn any bad habits. Immediately disregard any books that contain either of these.

Everything that works in C# 2.0 will work in C# 4.0, so if you want to learn from "How to Program 2005", you can do that with Visual C# 2010 (which supports C# 4.0).

#3 Postie   Members   -  Reputation: 1050

Like
0Likes
Like

Posted 19 July 2012 - 06:37 PM

There are language features in newer versions of c# that make older features obsolete. If your intention is to write c# 4 code, I'd learn that, otherwise you'll be learning stuff that you'll never use. If on the other hand you'll be coding or maintaining someone else's c# 2.0 code, you should familiarise yourself with that feature set, even if parts of it are deprecated now.
Currently working on an open world survival RPG - For info check out my Development blog: ByteWrangler

#4 jefferytitan   Crossbones+   -  Reputation: 2221

Like
0Likes
Like

Posted 19 July 2012 - 07:29 PM

Generally learning the latest is best, however it's not so bad to start old-fashioned. My advice would be to use the latest version of studio that you can get your hands on, turn warnings on and use code analysis occasionally, the warnings should let you know if you're using too many obsolete classes/features.

If you focus more on the language and core APIs (rather than the latest UI paradigm), you should be fine. From the link your friend gave you, I got to this page:
http://msdn.microsoft.com/en-us/windows/apps/hh852650#Build_apps_using_what_you_know

Which says that you can use C# with Metro.

#5 davepermen   Members   -  Reputation: 1016

Like
0Likes
Like

Posted 20 July 2012 - 05:46 AM

as you have to learn c# features step by step, you'll essentially go trough all the c#2 features, then 3, then 4, etc..

what's more important is the api side. more and more stuff gets rewritten to support the newest language, but old apis remain for compatibility. try to learn the newest apis, then (like there where about 4 different ways in .net to do async. use the newest one, supported by async and await, if possible. still, learn the others for the curiosity and knowledge).
If that's not the help you're after then you're going to have to explain the problem better than what you have. - joanusdmentia

My Page davepermen.net | My Music on Bandcamp and on Soundcloud


#6 darookie   Members   -  Reputation: 1437

Like
0Likes
Like

Posted 20 July 2012 - 02:16 PM

IMHO, you should go straight with C# 3.0. C# 2.0 added generics to the language, which is great, but I consider LINQ and lambdas to be far more important than the features that came with C# 4. Nevertheless, it doesn't really matter, as concepts are far more important when learning a programming language than single features are.

The concepts introduced with C# 3.0, however, really tend to alter the way you approach a programming problem. My vote goes to C# 3, as the C# 4 feature set is mainly aimed at experienced programmers and tackles rather advanced topics such as covariance and contravariance or async-support among others.

#7 tstrimple   Prime Members   -  Reputation: 1723

Like
0Likes
Like

Posted 20 July 2012 - 02:53 PM

The concepts introduced with C# 3.0, however, really tend to alter the way you approach a programming problem. My vote goes to C# 3, as the C# 4 feature set is mainly aimed at experienced programmers and tackles rather advanced topics such as covariance and contravariance or async-support among others.



Optional and named parameters are a welcome addition to C# / .NET 4 as are Tuples. Dynamic has some very interesting uses, but is ripe for abuse. I definitely appreciate the parallel programing improvements made as well.

#8 _Patrick_   Members   -  Reputation: 129

Like
0Likes
Like

Posted 20 July 2012 - 07:01 PM

only thing I want to know is, is it a mistake that I start learning C# with this book who cover C# 2.0 :

http://www.amazon.com/Visual-2005-How-Program-Edition/dp/0131525239/ref=sr_1_4?ie=UTF8&qid=1342832313&sr=8-4&keywords=visual+c%23+how+to+program+2005

like the first 10-12 chapters methods, array etc (the beginning) and then I jump to this book :

http://www.amazon.com/Programmers-Edition-Deitel-Developer-Series/dp/0132618206/ref=sr_1_10?ie=UTF8&qid=1342832411&sr=8-10&keywords=visual+c%23+2010

I have this wrox book too but I wonder if he's as good as the deitel book it seem like he doesn't explains the stuffs as clearly

http://www.amazon.com/Beginning-Visual-2010-Wrox-Programmer/dp/0470502266/ref=sr_1_3?ie=UTF8&qid=1342832470&sr=8-3&keywords=visual+c%23+2010

#9 Telastyn   Crossbones+   -  Reputation: 3726

Like
0Likes
Like

Posted 20 July 2012 - 07:03 PM

Learning is rarely a mistake.

Is learning 2.0 worse than learning 4.0? Certainly.

Is dithering on a web-forum about what to do worse than either? By far.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS