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! :) )
Windows Forms (WinForms) is a free and open-source graphical (GUI) class library included as a part of Microsoft .
Winforms and Windows Forms are the same thing. Winforms is the shortened name for Windows Forms.
A Windows form application is an application that has a graphical user interface(GUI) like the Visual C# IDE. A console program on the other hand is a text application. There are not fancy controls like buttons or textboxes in a console application and they are run from the command prompt.
NET Core 3.0 was released, Windows Forms went open source on GitHub. The code for Windows Forms for . NET 5 is a fork of the . NET Framework Windows Forms codebase.
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.
My guess would be:
Microsoft envisioned the .NET framework as having the ability to be multi-platform, but they were only going to provide a runtime environment for the Windows platform. They probably assumed that anybody providing a runtime environment for another platform would implement it in such a way that System.Forms could be used. The runtime would handle the differences between the native implemenations.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With