Introduction to C# for C/C++ users
I have 6+ years of C/C++ experience. Tomorrow starts a university assignment where I will have to use C#. Therefore I would like to have a list of links/resource开发者_如何转开发s which you think important or an extensive tutorial - in short everything you think worthy.
Coding style, 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 / tutorial suggestions regarding Linux specifically are very welcome.
Thanks for your help!
Charles Petzold has: .NET book zero
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
When I switched from C/C++ over to .NET, I found Charles Petzold's free PDF very helpful.
http://www.charlespetzold.com/dotnet/
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.
I would start with two books:
- "C# In a Nutshell", O'Reilly (latest edition covers C#4).
- "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.
Ide:
Visual studio express
Articles:
What you need to know to move from c++ to C#
Charles Petzold Pdf
C# Coding standard\Best practices
Books:
C# 3.0 in a Nutshell
Jon Skeet's book review
Good luck :)!
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.
精彩评论