R – Why is Windows.Forms in System and not Microsoft

namespacesnetwinforms

I always had the idea that the root namespace in .NET, "System", was mainly for stuff that didn't depend too much on a particular platform.

I was wondering if anyone had any ideas or insight as to why the Windows.Forms namespace is in System and not Microsoft since it seems to be fairly entrenched in one platform.

(No flame wars or unnecessary MS bashing if at all possible please! 🙂 )

Best Answer

I read somewhere that the System.* namespaces are for things that are part of the core .Net framework, whilst the Microsoft.* namespaces are for additional "value-added" optional extras, or things that are in development.

EDIT:

Brad Abrams has a discussion about it in his blog post What Does that .NET Namespace Mean: System.* and Microsoft.*

Additionally, a quote from Visual Basic 2005 with .NET 3.0 Programmer's Reference:

The Microsoft root namespace contains Microsoft-specific items. In theory, any vendor can implement .Net languages that translate into Intermediate Language (IL) code. If you were to build such a language, the items in the Microsoft namespace would generally not apply to your language. Items in the System namespace ... would be as useful to users of your language as they are to programmers who use the Microsoft languages, but the items in the Microsoft namespace would probably not be as helpful.

This would imply that if I was to make a new .Net language, I would be able to make use of the System.Windows.Forms namespace to make UIs, but I would probably not have much use for classes in Microsoft.* namespaces.