Which namespace from the .NET Framework should I research? - c#

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.

Related

Programming with .net

I've just recently learned C# and am interested in .net but I don't know where to begin.
I know .net is just a bunch of libraries and can be used for web programming?
I'm not quite sure what areas in .net that I need to learn?
I don't know what I am trying to accomplish with .net? But I want to learn .net.
What other things can be achieved with .net?
Thanks.
Added -
The 2D class that I finished was a C#/Winform/XNA class working with 2d objects. Though there was never once a reference about .net in class. I just learned C# which is comparable to C++ and Java and Winform = just using the tool box and hooking up controls to back end code. XNA portion was being able to use the hardware to draw primitives and manipulate data going through the model->view->project pipeline.
What part of this class was .net? None right?
You can do nearly anything with .net (the same is true for most other platforms).
You can use ASP.NET for web programming, Windows Forms or Windows Presentation Foundation for GUI development.
There are also lots of functionality for networking, database development and XML or Image processing.
But the question is, what do you want to achieve?
I know .net is just a bunch of libraries and can be used for web programming?
.NET is much more than this. It is not restricted to web programming. There are possibilities for doing Windows Applications (WPF), Web Applications (ASP.NET), Network Communication (WCF), Database Access (ADO.NET), ..., you name it. So just pick a language you would like to learn like C# and go ahead and visit MSDN.
.Net is a managed runtime with libraries. It is not exclusive to building "web" applciation or pages.
The .Net Framework is 'the libraries'.
The CLR is the runtime (where the specification thereof, is deposited into a standarization organization)
C#/VB.Net/F# are flavors of different syntaxus (how do you spell this in plural?) used to instruct the runtime, using the libraries, to perform actions in an order you define (AKA programming)
Wanting to learn .Net is akin to learning another language/gammar. If you have no previous knowledge of "language/gammar" itself, you are using this specific language/runtime to learn 'language' in general.
Hope this helps,
Sorry, but if you've just used the toolbox to hook some stuff together you haven't learned C# or programming. You've learned how to hook some stuff together, but you're obviously interested in learning how it works. Seems like you're going to have to learn a lot of stuff from scratch. There's a lot to learn...
I think your best bet to learn .Net and C# (you can't really learn one without the other) apart from following a course specific for that goal is to find yourself a good book that explains the whole picture and run through the examples in the book.
Looking on internet, asking questions, and collecting bits of examples, etc. will give you little pieces of understanding, but I doubt you'll be able to get a comprehensive understanding of programming, .Net and C# that way, simply because you won't find a big picture explanation. I find a good book gives me a deeper understanding even though I've already worked with .Net/C# since it first came out, simply because there is much more explanation of how things work and why.
Personally I really like the Pro series from Apress: have a look at Pro C# 2010 and the .Net 4 Platform
It might be perfect or not depending on your understanding of software development. Otherwise just search for C# and see if other interesting books pop up.

Is MSDN website sufficient for C# self-learning?

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.

What's a quick way to familiarize myself with C#, .NET framework, etc?

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.

What is the limitation of PerlNet?

I've used PerlNet for a data extraction project. Perl is a powerful language for extracting data and text manipulation with a huge CPAN module. However, my program need some kind of UI, thread... which I decided to use .NET C#. With Perl Dev Kit, we have an option to wrap an Perl module to a .NET DLL and use this DLL directly from C#.
Everything was ok but I have one question about PerlNet architecture. As far as I know, PerlNet was a research project between ActiveState and Microsoft for running Perl code in .NET but I did not find any document for this.
What is limitation of PerlNet? How was PerlNet constructed?
Thanks,
Minh.
There's a book "Programming Perl in the .NET Environment" that may help you.
ActiveState doesn't seem to have any publicly accessible documentation online that gives any kind of details about PerlNET. But I'd be very surprised if there wasn't some doc included with the Perl Dev Kit, even though it sounds like they aren't providing any support for it anymore.
You may find answers to your questions on the perl.net#listserv.activestate.com mailing list or in its archives.
While I can't really say more about the way PerlNet is built than is readily available, I will say that from my experience, it is fairly clunky and not very reliable.
If it's a "real" project, i.e. money is involved, I would steer away from using PerlNet.
Specifically, it seemed to trash shared memory in .NET, and would cause crashes erratically.
That said, I haven't used PerlNet for some time so it could be a much better product now.

How to stop worrying about using the best materials and just start learning .Net?

For the past few years whenever I learn something I tend to spend way too much time researching on the best materials for the subject than actually studying it. What should I do to get over this mentality? I am stuck. How to stop worrying about getting or using the BEST books, training videos and online materials on .net and just start learning?
Start doing a project with a deadline. You will code and learn together. If you cannot do that at work, think of a hobby project with some real requirements (like building a photo sharing site).
I completely agree on the just start coding philosophy. Another idea for a project is to go through the Project Euler exercises. They are somewhat simple math problems that get progressively harder. It is great if you can not think of a project or only have a little bit of time. Then just use a reference book, or the internet to learn what you need to about the language specifics.
Go download Visual Studio Express
http://www.microsoft.com/Express/
Go buy one of the following books:
ASP.NET 3.5 Step by Step
C# 2008 Step by Step
VB.NET 2008 Step by Step
From my experience (when I first started with .NET back in the 1.0 days) the Step by Step books from Microsoft are the best at just starting out and getting your feet wet with .NET.
1) Stop researching
2) Start programming
Seriously, the only book you need to program in .NET is CLR Via C# by Jeffrey Richter. Read it cover to cover (save the first couple chapters until you've read the rest, btw), and start coding. When you hit stuff you have problems with (Linq, WPF, source control, unit testing), come here.
Buy visual studio 08, devise a small project, and complete it.
Make a deadline for yourself and don't push it back.
Buy a basic C# book for reference, don't worry about which one.
You can do it!
Firstly, don't beat yourself up for not having done things the right way before, as I'm sure you know, there never is a right way. Also, some of that searching for the best resources will pay for itself when you have a better understanding of things than the next guy. And, as has already been said, do a project, pick something harder than the usual, trivial examples, so that you have to think and ask questions and do some research. Finally, if you have a blog then post about what you are up to, that way you'll have more of a sense of a commitment to stay working on the project rather than bailing out as it gets hard, especially as that is usually the time when you are about to actually learn something (this works for me anyway!)
There is no single best resource on anything. The best way to learn is to practice. Get any book to get yourself started. Then just start writing some code at home. Play with the language and the platform. Read blogs, browse the questions here. You will start discovering and learning nuggets of information.
Others mentioned buying Visual Studio 2008. It can be an expensive investment although it is totally worth it if you are a independent developer/consultant. However, if you just need something to get you started with coding, get the free Visual C# Express. You can always grow into the professional SKUs when you need it.
The best way is learn by doing!
When you work at a new job, you learn a lot because you have great individuals who transfer a lot of knowledge they find useful. You can review how they do things, which parts are done well and which parts are done poorly.
Learning by isolation is hard especially when there are so many resources out there.
I recommend connecting with individuals in your local community user group or an online group, or start your own group. Many of these individuals will have had real-world experience and can help direct your learning path more effectively.
Find an area of .Net you'd like to use, e.g. console Applications, Windows Applications, ASP.Net applications, web services, and just build a few little "getting your feet wet" sort of things like the basic "Hello World!" example or doing some simple computations or using an MS-SQL back-end if you do get SQL Express or the richer versions.
Don't forget that if you don't get in, some things may pass you by. How many ASP.Net 1.0 or 1.1 apps are out there using older systems that you may not be familiar with yet may be an incentive to start doing rather than trying to find the BEST that will be out of date in a few years. Take some of the ideas from a book like "Refactoring" by Martin Fowler if you want to program something a little bigger than the simple "Hello World!" program.
Download Visual C# Express 2008. Google for intro tutorials. Dig in and explore yourself.
This URL is all you need to get started with .NET:
http://msdn.microsoft.com/en-us/vcsharp/aa336768.aspx?wt.slv=RightRail
If you want mastery of .NET, there a lot of different ideas, but only one official self-education track. Get the official MCTS / MCPD training guides from Microsoft Press. These are searchable on Amazon by Exam number, such as Exam 70-536. But as long as you know how to Google for questions and tutorials, you don't need much else.

Categories