I know there are plenty of books on C#, but I'd rather learn by reading articles/guides and watching video tutorials. Would Microsoft's MSDN website be enough to teach myself C# in depth?
Thank you.
**Update*:*
#Jon Skeet: Thanks for your honest answer. I might just do that then, - I'll get Table of Contents from a C# .NET book and then go through each topic on MSDN.
Thanks again to all of you. I wish I could mark everyone's answer.
All the information is there, yes. Heck, the C# specification is available there, so that's all you need, in theory.
However - and I'm biased as the author of a C# book, of course - I believe that books add value by giving you a structured learning experience. Authors put a lot of time into working out the order in which to introduce concepts so that it makes the most sense.
Of course you could just take the table of contents from a C# book and then look up bits of MSDN in that order - but a good book will lead you through in a more orderly manner, building on examples and areas you've learned before rather than treating each one individually.
IMHO this will depend on your general programming level. If this is your first encounter with programming I think that a book would be better than MSDN. If on the other hand you have experience with similar technologies such as Java there's no reason MSDN wouldn't be enough as it contains extensive documentation, many tutorials and samples.
MSDN comprehensively covers all aspects of C# and the .Net platform. so Yes MSDN is sufficient to learn C#.
I would say so too, but only as a reference. That's what I did, and still do.
Edit: It might be hard for a beginner, but not impossible.
I think MSDN is a very good place to teach yourself C# in depth, that being said I don't think it's a good source to get you started.
Let me explain... MSDN is a great place when you want to work out how things work and why, what other options are there and all the rest of little details other sources usually overlook, but can be important. However, I think it lacks a certain "get up and do something meaningful" attitude you are looking for when learning a new language.
Just my 2 cents worth though.
Though I personally didn't learn it that way, there are some excellent resources on the MSDN now vs when I started with .NET.
In general, if you're going to learn C# from the MSDN, your launchpad will be here. If you're new to programming in general, here looks like a good place to start.
As far as I see it, there are articles about how to do things and articles about classes/methods, etc.
Some of the examples in articles about a class or method aren't enough for you to say that you know them and don't discuss everything, so I'd say they're a starting point - together with blogs and articles and tutorials on other sites you will probably get a lot more information.
The articles about how to do things, that start with a problem and show how to solve it, are ok and clear (or at least the ones I've read).
It also depends on what you already know and what you're building on.
Related
I have just discovered that i need to start looking for a new job. I have been working in basic features of c# 3.0 and i was never give the chances to play around with c# 4.0.
What is the best way to get up to date with all the new features in the framework?
The best way is the way that works for you. Are you the sort of person who learns how to do a task:
by trying to do the task
by reading about the task
by being tutored one-on-one by an expert in the task
by listening to lectures about the task
something else
?
We don't know how you learn, so we cannot answer the question. How do you learn best? It makes no sense at all to recommend a book to read if you're the sort of person who hates learning things from books but loves learning things by doing them.
all or any of following would help.
Read blogs
Read books
watch videos on msdn
Read SO discussions
Read the blogs, books, tutorials, watch videos, try sample applications and work at home. Once you've mastered the new features of .NET 4.0 you will have arguments to convince managers to give you the chance to migrate.
The MSDN latest news feed IMHO is a very good starting point to discover new features, the RSS is here:
http://go.microsoft.com/fwlink/?linkid=84795&clcid=409
Above this I check a lot of blogs, such as:
http://encosia.com/
http://weblogs.asp.net/scottgu/
Unlike the past couple of relases of C#, the new features this time are scattered all over. Pick some area that you think will really map into your career, like the parallel computing enhancements, or dynamic language support. If you've been doing a lot with generics, pick up the covariance and contravariance; they'll help a lot in some situations. I understand Expression support is improved as well; if you're a LINQ addict, you can probably do fun stuff with Expressions and expanding LINQ or writing your own query provider. If you work with COM, then look into the optional and named parameters. Many possibilities.
If you have a gmail account, set up the associated Reader and add C# blog feeds. That is my wat of keeping up to date. Of course it would not to hurt to read the blogs as well.
I am just beginning to play around with .NET (using C#).
Which namespace, aside from System.*, do I need to research ?
UPDATE: A number of people are asking why research namespaces.
My previous programming experience is mainly non-OOP and VBA (self-taught).
I have no idea at all to what has already been provided in the .NET framework.
I don't want to sit down and write string-handling functions (for example) to then find out that all the string-handling I could ever need is already written for me (and works better than mine)
Why do you want to start with namespace?
Rather start with windows form applications, web apps, database operations.
While working on these applications, you will need the details of required namespaces and classes.
At that time you can look int only required namespace.
I think you would benefit a lot more by reading over the source from a few decent applications than you will from researching a namespace. Of course, that largely depends on what you're trying to do - if you just want academic knowledge of C#, then that may be a solid direction. But if you want to actually build something, I would look at samples.
BabySmash is an interesting WPF app: http://babysmash.codeplex.com/SourceControl/changeset/view/17438
Speaking of, Scott Hanselman did a long series called "The Weekly Source Code" where he blogged about numerous open source projects whose source he was reading - to be a better developer. Most of those are C#.
I'm not sure whether it makes sense to try to research on whole namespaces. They are large and it could get boring...
My best way to dive into new frameworks or languages is examples.
Try to achieve something specific (e.g. create a simple web shop, a hello world winforms app, ...). For that, google on how to do that. While studying the code examples answering your specific problems, you will get to know the object model without even noticing.
You could also start with some tutorial. Or, if you like books, buy a book and read it. Namespaces, however, I do not even care about what namespace provides a certain class. I just right-click the class and choose "Resolve".
Some tutorials:
http://www.w3schools.com/ngws/default.asp
http://www.dotnetcurry.com/ShowArticle.aspx?ID=377&AspxAutoDetectCookieSupport=1
http://www.c-sharpcorner.com/UploadFile/jmukharjee/WindowsFormsTutorial111282005011245AM/WindowsFormsTutorial1.aspx
using Microsoft;
And there are many others on the internet, you'll find some good one on CodePlex, or write your own.
My recommendation would be start with the System.IO (Deep understanding of IO, reading and writing files, streams, etc).
For an "academic" vision of the framework read this book:
http://www.amazon.com/MCTS-Self-Paced-Training-Exam-70-536/dp/0735622779
Greetings ;)
This reminds of DNR episodes, where they have a namespace or a class to be the thing of the day - much like the letter of the day on Sesame Street.
Seriously though, researching a namespace in language framework will not give you much practical knowledge. Far better to trawl through online tutorials and give yourself a mini project to work on.
If you really want to research into Namespaces, then Microsoft and System are the only places you really need to go. Whithin the System namespace you should check out:
System.Collections
System.Data
System.Linq
System.Web (If you're interested in ASP.NET)
There are of course many others, but these are the main ones for starting out. You can check out MDSN for more info on these.
I agree with most of the others answers though in the fact that really you should just read a book or do some web tutorials (check out MSDN again). Its the way I learnt and it worked just fine, although I suppose it will not suit everybody.
I have a little programming experience with vb 6 and vb.net not much. Please tell me the best way to become an expert C# programmer and I know it will take a long time.
Think about how you learn human languages - reading, writing, speaking and listening.
Read code. Read articles. Read examples. When you're more experienced, look at the source code for some projects that you use.
Write code. Play with the examples you've read about. Modify them. Solve problems from Project Euler. Think of your own projects then try to solve those.
Talk about code. Blog about it. Tell your friends about it. See if you can impress your grandmother with how good your program is. Now try to impress your professor. Learn how to communicate about programming with different types of people.
Listen to other programmers. Many of them have more experience than you and have useful things to say that you can learn from. Learn the vocabulary they use. Discuss your ideas with them.
Practice. Practice. Practice.
Google is your friend.
Start by downloading http://www.microsoft.com/express/ and start programming. If you don't have a project of your own or something someone else wants done, start looking up popular algorithms and implement those. Try implementing certain design patterns. This way rather then just focusing on syntax your learning a heck of a lot more about programming in general.
Even though I feel the other answers on this thread already well-cover the bases, in terms of replying to a pretty "nebulous," even "naive," question : I'm going to add another opinion (slightly too long to just be a comment).
I respectfully disagree with a few posts suggesting an analogy of learning a programming language to learning a spoken, or written, language. SO is not the place to discuss linguistic theory, and its relation to evolution, and cognitive structure, and the work of Chomsky, and Pinker, et. al., which suggest not only language learning's "innateness," but also how variation in "endowment" (genetic, and, yes, even "temperament"), and its dynamic interaction with environment, and "developmental windows of opportunity" at which learning can take place at phenomenally accelerated rates, contributes differentially to morphemic versus phonemic competency, etc.
But, please allow me just to register the hypothesis that there are many ways in which the analogy of learning a programming language to learning a spoken and written language is more of a "catch-all" that masks complexity, rather than a useful tool.
On the other hand, I suspect (hypothesis) that a person who has achieved mastery of more than one spoken/written language has, indeed, developed certain cognitive structures and skills that may be "useful" in learning a programming language.
To my mind the above two paragraphs are not inherently contradictory statements.
imho programming in general is also not analgous with learning mathematics or geometry which build structures up from axioms, or fundamental assumptions, into complex systems that sometimes can be "formally" proven, or validated. Of course there are some "rare birds" who start off from Knuth, or Gamma, et. al. and "Design Patterns," and "work their way down" to the "real world" :)
My "vote" goes with starting with a good book, and, as Mark Byers suggested, combining that with practice, testing yourself, taking on problems like those on the Euler project Mark mentioned, and, yes, certainly, also as Mark suggests, studying other people's code.
The question, in the beginning, though, is, imho : how to know which code is good to study.
For me the answer to that is : study the code examples provided by really good books like those by Jesse Liberty, for example : "Programming C#" latest (3rd.) edition from O'Reilly. Note : my understanding is the 4th. edition is due in March 2010.
imho Jesse has an unusual gift as a teacher of programming languages, an ability to "pace" the introduction of material in a skilfull way, to select and present the right examples in the right sequence, and remarkable gifts of clarity in his technical writing.
CodeProject articles are a great resource for code examples to study. Look for articles in areas that interest you that have a very high rating by other users, and are specific to C#.
The lesser-known book by Liberty "C# 2005 : A Developers's Notebook" is a fantastic resource (also, imho, one of the most fascinating books in terms of graphic design and book structure, ever done in any technical arena). It's a series of "exercises" that I would compare to the idea of "etudes" in music : each exercise demonstrates a topic, challenges you to understand a good example of that topic, and each topic is really something that will be useful in your "real-world" programming.
imho, once you have your "feet on the ground" with a hundred hours or so of study and practice of .NET : fly, don't walk, to the "guru-level" with Jon Skeet's "C# in Depth" published by Manning. He also, imho, is a superb technical writer who shares with Liberty the gift of selective presentation of material, and has his own special, unique, gift for "stepping out of the book to speak to you directly," addressing the kinds of concerns you are probably thinking about as you encounter more difficult material. I should note that I feel I am a long way from mastery of the content of this book, which just whets my appetite for understanding it. There's an element of wit and humor in Skeet's writing that also, in my experience, is extremely rare in technical books.
Please note : disclaimer : while I have worked as a paid consultant for Addison-Wesley on the technical editing of two major .NET books, I have never worked for O'Reilly or Manning, or received "comp" copies of their books (dammit :).
I must, respectfully, disagree with the recommendation of "C# in a Nutshell" by Albahari and Albahari (also O'Reilly; I believe 4th. edition is out now : I have only seen 3rd. edition) above : I think it would be a very inappropriate tool for a newcomer to .NET. On the other hand, when you get to studying Linq : you'll find, imho, that Albahari's website and free version of LinqPad is just the coolest thing ever done for helping you "get into" and explore Linq.
Good luck !
The same way you learned VB6 and VB.NET, no doubt. Pick up a book, and start reading. There's nothing radically different about it that requires any esoteric approach to learning. Just good old fashioned squatting in Barnes and Noble for a few hours before breaking down and buying a book. You could also mosey around http://msdn.microsoft.com/en-us/vcsharp/aa336809.aspx and read up a bit.
If you've already been using VB.NET, C# should come pretty natural to you. The syntax will be different, but the objects, methods, etc will all be familiar. Check out the tutorials on MSDN for C# too: http://msdn.microsoft.com/en-us/library/aa288436(VS.71).aspx
Oh, and welcome to StackOverflow!
If you're already familiar with other programming languages, the O'Reilly "In a Nutshell" books are generally a good place to start. "C# in a Nutshell" is both a good introduction and a good reference.
Download Charles Petzold's .NET Book Zero and read it through from start to finish, skip nothing even when you think you a fair bit about a particular area.
I'm thinking about learning Java. I'm already a more than competent c# developer. Has anybody else been in a similar situation? Roughly how long (whilst doing a typical 9-5 job) did it take you to transfer your skills? What resources would you recommend?
(When talking about resources, I specifically mean resources aimed at developers who want to learn Java, not newbie material)
I studied Java at university, and did c# at work.
You will find the Sun Java API (Javadocs) to be very informative and will help you dearly. You can find it here. This website should be the first to consult if you need a query, as it is brief, and up-to-date - similar to the MSDN Library for c#.
Also, Java has a strong community who will be willing to help # the forums.
Finally, I think its best to learn Java through practice and experimentation over theory. You will need a good IDE to start you off and there are plenty to choose from. Eclipse and Netbeans are notable Visual Studio contenders, but personally I prefer JCreator(albeit the version with intellisense is not free). It maybe text based, but you have greater control IMO.
If you are going to create GUI applications, then you should learn about swing. Again, the guys at sun provide excellent tutorials on the matter.
There are also books:
Java in a nutshell is a nice book. Click for google preview.
Java: the complete reference By Herbert Schildt is one I would highly recommend. Google Preview.
I'd recommend these books:
Effective Java (Joshua Bloch)
Core J2EE Patterns (Deepak Alur; John Crupi; Dan Malks) - sort of out of date, but still useful for understanding the history of J2EE. A lot of this is still applicable.
Concurrent Programming in Java (Doug Lea) - good guide to Java threading
Here's a more comprehensive list:
http://www.javalobby.org/articles/5books/full.jsp
It shouldn't be a difficult switch. Java is pretty much a subset of C# (Operationally) since C# was a Java clone that has mutated since it was split. (Everyone here remember the fiasco when MS tried to embrace java by modifying it so it would only work with windows, was sued by Sun and then made J++ and C# instead?)
The biggest difference will probably be the libraries, but if you are proficient at C#, then you shouldn't need to do anything more than study the Javadocs to pick up the new libraries.
EE might be a bit of a jump, but that's a whole 'nuther world.
For me, the nicest thing about Java is the minimal syntax. There are very few surprises or tricky parts to remember (Well, Generics have a kind of tricky syntax to implement, but using them is pretty straight-forward). If you agree with this or not--it does tend to make the learning curve a bit more shallow.
I started in Java and went to C#.
I will be honest with you; going back to Java won't be so easy, depending on how you started. It's going to change your world a bit. J2EE is quite different from ASP.NET, even though it looks a bit the same. Forget lots of things you used to hold dear, like == of strings, and switch on strings, and properties, and other such nicities. Oh, and prepare to be welcomed by checked exceptions.
Don't get me wrong, I love Java, and it's a great language, but you'll need be wary of the differences.
I would say a fun way to learn would be to write a program simultaneously in Java and C#, and see how you would do each thing, and note the differences.
I think you may find books hard to read, as they'll cover the basics, which will be boring for you, so you may skip critical things.
Learn by doing :) That is my approach.
I just graduated college and will be starting working in about a month and I was asked to familiarize myself with C++, C#, .NET framework for NT Services and web services.
I'd appreciate recommendations on how to familiarize myself with these topics (books? internet links?) in a short time span. I don't expect to be an expert on it in a month but I don't want to be clueless either. I already know C++ and I consider myself to be fairly proficient in it and I know the basics of C# even though I haven't used it all that much. For C# I do own a book called O'Reilley Programming C#.
Thanks!
I would start by pulling down Microsoft's Visual Studio Express products. Your O'Reilly book is a perfectly good book to start with.
Start reading blogs and listening to podcasts, to begin to familiarize yourself with all of the technologies out there that surround c#. You will be very excited about what you can learn. Here are some of the better ones:
http://www.hanselminutes.com/
http://www.dotnetrocks.com/
http://channel9.msdn.com/
http://weblogs.asp.net/scottgu/
http://weblogs.asp.net/
In addition, the MSDN library is an invaluable resource. You can almost always find what you need there. This is where the reference for the entire .NET framework lives.
http://msdn.microsoft.com/en-us/library/default.aspx
Happy hunting!
Nothing beats actually using the language. As much as some of the information sources already quoted would be very useful to check out, I'd say make sure that you at least try and write some concrete C#.
The best place to start might be a non-trivial-but-not-too-large application that you have already written in something you know, and try to convert it to C#... even better if you can get somebody proficient in C# to peer-review your results to make suggestions where you could make better use of the language-specific features that may be new to you.
Fundamentally, if you just read books and watch videos, you may feel like you actually know it, but it is nothing like doing it yourself (as my Uni maths classes taught me... a good teacher can make the impossible look trivial on a blackboard).
That is a huge surface area. Pro C# 2008 and the .NET 3.5 Platform by Andrew Troelsen is a good place to start.
These are good podcasts that will give you an overview:
.NET Rocks
dnrTV
Herding Code
Microsoft Labs and Webcasts
Here's a good SO thread with lots of resources. I recommend you check out MSDN Virtual Labs. They have lots of great training that let's you get your hands on the technology, in particular, check out the C# ones.
I was in the same situation in late November 2008.
If you are familiar with IDEs and another programming language, download Visual Studio Express and start playing with it. It's free :)
http://www.microsoft.com/express/
And I always recommend this webpage:
http://www.java2s.com/Tutorial/CSharp/CatalogCSharp.htm
You can select the relative topic you are interested on this stackoverflow site based on the tag name, and read through some posts, it will give you a good feeling what are common issues/challenges people face in day-to-day programming.
One way is listening to podcasts. We do one called Deep Fried Bytes that contains a variety of topics on any and everything.