Is it must to learn all the other versions of c# before starting with c# 4.0?
Asked Answered
C

11

13

As i am a beginner who just finished my engineering and i have good knowledge in c,c++... I thought of studying c# as well but i found that c# 4.0 has been released.....

  • Should i care about the previous versions?
  • What are the tips you give for beginner to learn c# quickly?
  • what are the factors to be considered when moving from c,c++ to c#?
Conservatory answered 19/4, 2010 at 11:7 Comment(0)
M
19

C# 4 is basically a superset of all the other versions, so if you know C# 4 then you definitely know the earlier versions. On the other hand, I think it's worth knowing what's in which version. I have a couple of "bluffer's guides" on my C# in Depth web site which give a bit of information about C# 2 and 3 - I'll do a similar one for C# 4 soon. See this question for a very brief list of features in each version.

As for migrating from C and C++ - try to ignore everything you think you know. Some bits will be similar, some will be completely different. You should try to work the way the language expects you to, rather than applying C++ idioms to it.

You might want to read Essential C# 4.0, C# 4.0 in a Nutshell or Accelerated C# 2010. My own book - C# in Depth - will have a second edition soon, covering C# 4, but it's really designed for people who already know C# 1.

Maple answered 19/4, 2010 at 11:12 Comment(3)
All that said, he should really pick up a version of C# In Depth after he learns the basics -- so worth it!Divine
Must say Jon, I really enjoyed the sample chapters of C# in Depth and am waiting for the second edition to be released before I turn over my hard earned cashmoneys.Mazurka
@runrunraygun: That's fair enough - I'm very much looking forward to counting it as "done" :) I'm into indexing now, which is never fun :(Maple
P
5

No. Just get a good book about 4.0. If the book is complete (i.e. nto a "for people knowing 3.5) then it is complete.

Just forget about previous versions, UNLESS specifically called for (not every commercial project is going to use 4.0 at the moment).

Tips? Get a good book, READ THE DOCUMENTATION.

C/C++ - welcome in a managed memory world. Get around the garbage collected approach. NOW. Get around not having pointers (that you can manipulate) and don't bitch about it - the faster you get comfortable with that environment, the faster you feel ok ;)

Papaya answered 19/4, 2010 at 11:11 Comment(0)
F
4

Should i care about the previous versions?

Yes. You should at least know which features of 4.0 the older version DON'T have.

There's a good chance that if you're using .NET on the job, they're not going to be at 4.0 yet. Therefore, you're going to need to know which features you can use and which you're going to have to work around.

What are the tips you give for beginner to learn c# quickly?

Find a good book and start at the beginning.

I would recommend either Pro C# 2010 and the .NET 4.0 Platform or C# In Depth: Second Edition

What are the factors to be considered when moving from c,c++ to c#?

Know the naming conventions and differences of each.

C/C++ gets compiled to native code. C# gets JIT compilation.

C# has memory management. C/C++ doesn't (at least not the same).

C is not an object oriented langauge. C++/C# are, but each handles OO in a slightly different way.

Those kind of differences will change how you write/think about your code.

Flowerage answered 19/4, 2010 at 11:12 Comment(0)
S
1

Should i care about the previous versions?

Yes, you should. I'd recommend starting with 2.0, which is the foundation for all future versions, then incrementally learning the 3.0, 3.5 and recently released 4.0 versions.

What are the tips you give for beginner to learn c# quickly?

Like most languages, the biggest tip is to use it. Start coding some small applications to try and take advantage of common language features, then move on to try different areas of the framework that interest you.

Salable answered 19/4, 2010 at 11:12 Comment(0)
W
1

I am a beginner in C# as well. I am focusing on the new technology, since most companies will want the newest tech. So I emphasized on 3.5 (and breifly glanced over 3.0 and 2.0). Odds are, you will not be working on a new project using 1.0 or 1.1 If I were you, I woudl focus on 4.0 and have a good understanding of 3.5

HTH

Wanonah answered 19/4, 2010 at 13:6 Comment(0)
M
0
  1. You should care about .NET 3.5.
  2. Learn quickly? Write lots of code - and read this.
  3. C is an entirely different animal. C++ has no GC and other niceties. You'll (hopefully) understand objects. But there are lots of new things supported in C#, like interfaces, delegates, built-in threading, LINQ, etc.
Messmate answered 19/4, 2010 at 11:10 Comment(0)
E
0

Best advice I can give - get a good book! Check the Wrox series - they have very good books, and can get you started quickly.. Look for something like ".NET 4 Beginning".

And no - if you know the principles you don't have to know all the details about the previous versions, especially if you're confident that you will only be working with the new ones.. But if you have the time and the desire - it never hurts to learn more, trust me :)

Good luck!

Edam answered 19/4, 2010 at 11:10 Comment(0)
M
0

C# 4.0 is the superset of the previous versions' features. So the answer to your first question is "no, just read a C# 4.0 book".

Materialism answered 19/4, 2010 at 11:12 Comment(0)
H
0

.NET 4.0 adds capabilities on top of the previous versions and even if it was a new language altogether you still need to know the "previous" version because the are still used in the industry. The good news is that you don't need to learn a version just learn .NET and then find if the feature exist in previous versions.

Learning C# is like learning any other language - either take a course, create a pet project or learn as you go (or all of them).

When moving from C++ to C# the biggest difference is the existence of garbage collection. Luckily c# is very similar to C++ so you should be able to read (and write it) virtually from day one. You should be able to find a few differences (structs are values just like int) and you have a very extensive base class library you can use.

Hannis answered 19/4, 2010 at 11:14 Comment(0)
K
0

It would be a waste of your time to learn ALL the C# versions. Go straight to learning C# 4.0 and don't forget the version immediately preceding 4.0. The mastery of the IDE you use matters very much. And most importantly, code, code, code.

c,c++ and c# are "brothers and sisters" so you're in familiar territory.

Kemp answered 19/4, 2010 at 11:26 Comment(0)
N
0

One factor none of the answers so far seems to have mentioned is the fact that there are many constructs in the previous versions that are no longer relevant if you are building a new .NET 4 application from scratch.

It's not sufficient just to know that .NET 4 is a superset of previous versions, you'll want to know which areas of the previous versions are essentially obsolete so you can avoid them and use the new, better, constructs.

For example, don't use ArrayList, use generic List<T> instead; don't use Hashtable, use Hashset<T> or Dictionary<T, U>; use the new Task type instead of Threads and synchronization primitives to simplify you code; etc. etc.

Nelda answered 27/12, 2010 at 6:1 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.