tags:

views:

420

answers:

7

What is the class hierarchy that is most necessary to get a excellent grasp of, for the aspiring C# desktop applications programmer? Not just the totally obvious stuff.

EDIT: To clarify, I mean, that as I am learning C#, I would like to know what are the classes I should be acquainting myself with, that aren't necessarily going to be obvious to someone who isn't experienced enough to know what is, and is not important to learn.

EDIT2: Are there any more obscure classes? So far I know a good deal about many of these already given.

+8  A: 

System.Collections

System.Data (many apps have a database backend)

System.Windows (as it's a desktop app)

System.Graphics (as above)

System.Diagnostics (provides various objects and methods useful for logging and when debugging, always important in commercial code).

These namespaces contain important classes to do a lot of everyday stuff done in most applications, regardless of whether the app is web or desktop based. Windows is pretty much just for desktop apps (like you said you do), and graphics will compliment that closely (also compliments web apps too). You'd do well to learn all the classes in these namespaces, even though you asked for just classes.

dotnetdev
Thanks. It was helpful.
Alex Baranosky
System.Collections.Generic is much more important than System.Collections.
configurator
Did you mean System.Drawing? I am not finding System.Graphics on msdn.com
Alex Baranosky
GordonG: I'm not sure if System.Drawing is a core namespace as it is not supported at all in ASP.NET or Windows Services (it will work though, but it's not stable)
DrJokepu
I think it may have been System.Graphics.Drawing. I will have to check that. Also, I mean core in terms of likelihood of use in a desktop app, not core in most important in the Framework or most relied upon by the framework (e.g. many methods return or ask for a collection of some sort).
dotnetdev
Also, if it is System.Drawing, you might need to add a reference. Can't remember exact path. When I say "most important in the Framework" I really mean most fundamental.
dotnetdev
+1  A: 

For desktop applications, I would add to GSS comment : System.Windows.Forms. These classes are the base for desktop development.

Best wishes, Sylvain.

Sylvain
A: 

StringBuilder is a very important class.

Basically when you want to do lot of dynamic string concaternation with + operator, what you really want to do is to use StringBuilder.

Krzysztof Koźmic
But only use a StringBuilder when you have a significant amount of string concatenation going on...
Mitch Wheat
Seconded; there is nothing wrong with `a + b + c + d + e` - the compiler uses string.Concat for you. You generally use StringBuilder when you are appending in a loop.
Marc Gravell
Jon Skeet has very good article when to use StringBuilder (http://www.yoda.arachsys.com/csharp/stringbuilder.html), and based on it your example is bad.
Sunny
All of which doesn't detract from the **correct** statement: "StringBuilder is a very important class."; it is just the example that is wrong. I think -3 is unfair for this...
Marc Gravell
+2  A: 
System.Collections

System.Collections.Generic

System.IO

System.Diagnostics
Mitch Wheat
+2  A: 

System.Text anyone?

That is one of the most important, at least for me, you will need it to perform basic operations on text such as convert text between encodings...

Gustavo Rubio
+2  A: 

Just found this link in another thread: map

Also, download Reflector and browse through the .NET Framework classes, starting with mscorlib.dll and System.dll.

I love the poster. I plan to examine all of the namespaces and classes on there.
Alex Baranosky
A: 

I can suggest the following :

  • System.Windows.Form
  • System.Windows.FileDialog
  • System.Windows.Forms.MDIClient
  • System.Windows.Forms.MessageBox
  • System.XML.XMLDocument
  • System.XML.XMLNodeReader
  • System.XML.XMLReader
  • System.Drawing.Text
  • System.Collections.*
  • System.Diagnostics.Trace/Debug
  • System.Configuration.* - System.Component.ComponentModel
  • System.Text.*
  • System.Timers.Timer
  • System.Data.*
Codex