What book would you recommend to learn C# from 0?
-
OriginalGriff wrote:
t has it's uses - you can;t do Linq without it
Linq is itself too often used/abused when often it's really not necessary at all, it's backward syntax order is a PITA for those of us that work in multiple languages and later need to unravel some newbies 'I can do it all in one line' compound statements. I'd not loose a second sleep if it were removed entirely.
signature upgrading ... please wait.
I completely agree on the syntax - that's why I use the methods instead - but Linq does have some advantages over the "loads of loops" approach! :-D
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay... AntiTwitter: @DalekDave is now a follower!
-
Hi all, Coming from Visual C++. I'll have a little bit of time in a while and I'd love learning C#... Which book would you recommend me? Thank you! :thumbsup:
I know this is not exactly an answer to your question, but I would warmly recommend the following: 1) Job interview questions as by far the best source of condensed information about very handy C# features. A 100 questions interview is worth 314 pages in a book. 2) F..k Occam's razor. Complicate! Go to Stack Exchange and check three solutions to your problem, even if you know how to solve it. It helps build your skills beyond trivial. 3) Twitter for practicing code optimization.
-
Can't recommend that book enough.
Every day, thousands of innocent plants are killed by vegetarians. Help end the violence EAT BACON
-
Hi all, Coming from Visual C++. I'll have a little bit of time in a while and I'd love learning C#... Which book would you recommend me? Thank you! :thumbsup:
If you want something that starts at the core of C# and - to a degree - programming, I'll have to recommend Rob Miles' Yellow Book[^]. It certainly helped me learn C# quite thoroughly, although I'll have to admit that he was one of my lecturers when I attended university.
-
I'd disagree to an extent: they ripped C++ to bits when they first created C# and got rid of a lot of the "dangerous" stuff - memory leak causes and so on - to create a simpler language that was faster to develop with than native C++ as a result. Since then, they have been layering on more complexity - some of it useful and justified, some of it badly abused. It's perhaps getting to the point where C# needs to be ripped apart and the same exercise done again (.NET Core would have been a good opportunity to do this)
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay... AntiTwitter: @DalekDave is now a follower!
OriginalGriff wrote:
C# needs to be ripped apart and the same exercise done again
Couldn't agree more. It's getting so bloated and ugly that it's starting to look like C++.
To alcohol! The cause of, and solution to, all of life's problems - Homer Simpson ---- Our heads are round so our thoughts can change direction - Francis Picabia
-
I'd also agree on "C# in a Nutshell" by Joseph and Ben Albahari. If you ever really want to take a deep dive into C# and the CLR I highly recommend "CLR via C#" by Jeffrey Richter. In the meantime though, the Microsoft Docs on C#[^] are quite good to start off with :thumbsup:
Jon McKee wrote:
"CLR via C#"
This book is awesome. Must read for an in depth understanding of C# on top of .net.
To alcohol! The cause of, and solution to, all of life's problems - Homer Simpson ---- Our heads are round so our thoughts can change direction - Francis Picabia
-
It has it's uses - you can;t do Linq without it - but when you get lazy f'wits using it on every variable definition it's a PITA for maintenance:
var i = 666;
Is just lazy.
var p = ComplicatedFunctionInAnotherClass(long, list, of, parameters);
Is lazy, stupid, and uncaring of maintenance or the poor sod who will have to do it.
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay... AntiTwitter: @DalekDave is now a follower!
I agree with using a var for what clearly should be an int. Or should it be a long? Or a 64-bit unsigned int? As for your 'p' example--it all depends on what you do with it next. If you just need to hang on to it so you can eventually return it from the current function, or to pass it as a param to another function, then under those circumstances I'd say the exact type shouldn't matter to a reader.
-
I completely agree on the syntax - that's why I use the methods instead - but Linq does have some advantages over the "loads of loops" approach! :-D
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay... AntiTwitter: @DalekDave is now a follower!
Agreed! Linq makes things easier to write, easier to maintain, easier to understand, and just makes code 'prettier'. I cannot stand ugly code!
-
Pro C# 6.0 and the .NET 4.6 Platform[^] by Andrew Troelsen. I've not read this edition (I have the VS2008 version), but it was a very good introduction.
Software Zen:
delete this;
I agree Troelsen's book is very good BUT as a former instructor NOTHING beats a textbook with structured lessons. Deitel and Deitel are arguably the best textbook publishers and "C# A Programmer's Introduction" is what I would recommend to get started from scratch. Expensive but worth it if you are disciplined enough to do every excercise as if you were in school else a waste of money that will end up on the shelf next to Troelsen's "C# and the .NET Platform."
Clinton Gallagher
-
Hi all, Coming from Visual C++. I'll have a little bit of time in a while and I'd love learning C#... Which book would you recommend me? Thank you! :thumbsup:
-
Hi all, Coming from Visual C++. I'll have a little bit of time in a while and I'd love learning C#... Which book would you recommend me? Thank you! :thumbsup:
This one helped me get off the ground https://www.murach.com/shop/murach-s-c-2015-detail
-
Hi all, Coming from Visual C++. I'll have a little bit of time in a while and I'd love learning C#... Which book would you recommend me? Thank you! :thumbsup:
-
Hi all, Coming from Visual C++. I'll have a little bit of time in a while and I'd love learning C#... Which book would you recommend me? Thank you! :thumbsup:
This one helped me get off the ground - [MurachBooks](https://www.murach.com/shop/murach-s-c-2015-detail). Its URL is https://www.murach.com/shop/murach-s-c-2015-detail
-
Hi all, Coming from Visual C++. I'll have a little bit of time in a while and I'd love learning C#... Which book would you recommend me? Thank you! :thumbsup:
Hi, I have had good luck with the "Dummies" books. I needed to learn C++ in two days and the "Dummies" book was right on target. I also got a lot of value from the Python "Dummies" book. Try C# for Dummies.
-
Hi all, Coming from Visual C++. I'll have a little bit of time in a while and I'd love learning C#... Which book would you recommend me? Thank you! :thumbsup:
It depends what you mean by 'from 0'. If you have C++ experience it may not be necessary to start right from the bottom. The most interesting one I have read, though a little advanced, is Accelerated C# 2010 by Trey Nash. That said, I rarely use C# these days as i have jumped ship to Java and JavaScript / PHP, so I may not be the best person to ask! The hardest part of C# to learn, in my experience, is delegates and the above book explains these well. In fact i never understood delegates at all until I read Trey's book. personally, though, I prefer the way Java handles events, I find this more intuitive.
-
Jon McKee wrote:
"CLR via C#"
This book is awesome. Must read for an in depth understanding of C# on top of .net.
To alcohol! The cause of, and solution to, all of life's problems - Homer Simpson ---- Our heads are round so our thoughts can change direction - Francis Picabia
This is the best choice, especially if you're coming from native c++. You need to learn not just the c# language, but how to use it effectively on the .net platform. I also came from c++ to c# via this book.
-
Hi all, Coming from Visual C++. I'll have a little bit of time in a while and I'd love learning C#... Which book would you recommend me? Thank you! :thumbsup:
CLR via c#[^] Especially if you're coming from native c++, you're looking to learn not just the c# language, but how to effectively use it on the .net platform.
-
Hi all, Coming from Visual C++. I'll have a little bit of time in a while and I'd love learning C#... Which book would you recommend me? Thank you! :thumbsup:
-
Pro C# 6.0 and the .NET 4.6 Platform[^] by Andrew Troelsen. I've not read this edition (I have the VS2008 version), but it was a very good introduction.
Software Zen:
delete this;
I would second Troelsen. I had a class that used Troelsen's book in 2005 when VS2005 and .Net 2.0 was in vogue. He does a good job of explaining the subject. Be sure to read the first few chapters, then go to where you can start programming windows programs, either forms or WPF. (Forms is easier.) There are other books out there, but they are more for reference than taking you step by step.
-
I'd disagree to an extent: they ripped C++ to bits when they first created C# and got rid of a lot of the "dangerous" stuff - memory leak causes and so on - to create a simpler language that was faster to develop with than native C++ as a result. Since then, they have been layering on more complexity - some of it useful and justified, some of it badly abused. It's perhaps getting to the point where C# needs to be ripped apart and the same exercise done again (.NET Core would have been a good opportunity to do this)
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay... AntiTwitter: @DalekDave is now a follower!
Actually, they simplified C++, as did Java. C++ was getting quite complicated and watching Bjarne Stroustrup running through the variations of template examples was enough to make your head swim. Both Java and C# are good attempts to simplify what C++ has become. Also, most people decided to take up C# because of the pointer problems with C++. Too many times, a raw pointer would be missed or deleted too soon and problems would arise. This was occurring in much larger programs. So, I am happy (so far) with C#.