views:

230

answers:

7

I have 6+ years of c/c++ experience. Tomorrow starts a university assignment where I will have to use c#. Therefor I would like to have a list of links which you think important, an extensive tutorial - in short everything you think worthy.

codingstyle, best practices, ...

(I don't know any specifics about the c# environment I will be using(IDE, OS, w/e), the first meeting is tomorrow evening)

(I have never coded c# before)

One more thing: I would like to work using linux (kubuntu 10.4). IDE / environment / turorial suggestions regarding linux specifically are very welcome.

thanks for your help!

+5  A: 

Charles Petzold has: .NET book zero

Niall C.
+1  A: 

There is basically one editor for c# which is used by I guess 80% of the c# developers, Visual Studio.

Start downloading buying/downloading it. You have the express edition, which is free and meant for personal use. It is only a simple IDE with nothing fancy. If you have some bucks to spend (or can get it through the university) go for a more advanced version of VS, like professional or team system. Both include form designers and much more advanced capabilities.

So much for the IDE.

I guess if you go from C++ to C# the biggest "problem" will be to use existing functionality in the .NET framework instead of making it by yourself. This is what I see often when people go from C++ (even with boost) to .net. The framework is so large and contains almost everything, so every time you find yourself writing some aux. class which is not domain specific, lookup in the manual if something like that doesnt already exist. Odds are they're in the framework.

And finally, learn to use lambda's, you're going to enjoy them so much!! That is the only significat thing that c++ does not support by itself. All extensions like boost that add lambda's are soo complicated and far from elegant that its usually not worth to use it.

Henri
I think the 80% is way too low. `:)` I second the statement about first looking at the framework. (Lambdas, BTW, will be part of C++11.)
sbi
+1  A: 

When I switched from C/C++ over to .NET, I found Charles Petzold's free PDF very helpful.

http://www.charlespetzold.com/dotnet/

nivlam
+1  A: 

I would start with two books:

  1. "C# In a Nutshell", O'Reilly (latest edition covers C#4).
  2. "Framework Design Guidelines: Conventions, Idioms, and Patterns for Reusable .NET Libraries, Second Edition", AW

A 30 day trail of Safari Books Online will give you access to both until you decide if they suite you).

With all the focus on #1 initially.

When I learnt C#1 (while .NET 1.0 over a few hours with "C# Essentials" I just needed something to show be the syntax and semantics as I already knew how to program.

Richard
You're an audio thinker like me eh :) "as I already new how to program".Thanks for the hint. Sadly these books are pretty expensive. Hints were to get them cheaper (Except the library).
Ronny
sbi
@Ronny: more a case of typing quickly.
Richard
+3  A: 

Quick introduction to syntax + essentials of a language.

Obvious link to an overview of a platform :)

Best practices discussed here, on SO

It's better to read books of course, when a sufficient amount of time is available. I personally started to learn c# by reading Pro C# 2008 and the .NET 3.5 Platform

P.S. If you want to use linux, here you go:

IDE

Framework

n535
thanks. +1 for the useful edits.
Ronny
A: 

If you can write C++, you can write C# with very little effort. But the C# language is a very small part of being a .NET developer, it's the experience with the .NET Framework that you'll be missing for some time to come. And the Base Class Library has a small common core and several almost totally distinct toolkits (WinForms, ASP.NET, WPF, WSDL+WCF, Workflow Foundation), it's possible for a very experienced C# developer to know almost nothing of several of these specialties.

Until you find out what your task is, we won't know which of these areas you need to familiarize yourself with and can't give very many pointers.

You'll probably find it useful to refer to the "Alternative Managed API" on pinvoke.net for all kinds of native Windows functions.

Ben Voigt
reason for downvote?
Ben Voigt
I didn't vote down. the upper paragraph is total bla. I don't know pinvoke, thus I have no comment on that.
Ronny
Rewrote the first paragraph because it wasn't at all succinct. Thanks for the feedback. pinvoke.net is most useful when you know the old APIs, whether you're looking for a way to use them from inside .NET (P/Invoke) or looking for the replacement canonical .NET way to do things which is also listed for most functions.
Ben Voigt