tags:

views:

414

answers:

10

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#?
A: 
  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.
duffymo
There's no such thing as C# 3.5...
Jon Skeet
A: 

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!

Artiom Chilaru
+3  A: 

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 ;)

TomTom
+1  A: 

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.

PatrickJ
+3  A: 

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.

Justin Niessner
A: 

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".

Dmitry Ornatsky
+15  A: 

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.

Jon Skeet
All that said, he should really pick up a version of C# In Depth after he learns the basics -- so worth it!
RCIX
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.
runrunraygun
@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 :(
Jon Skeet
A: 

.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.

Dror Helper
A: 

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.

A: 

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

user279521