为什么在系统Windows.Forms的,而不是微软?微软、而不是、系统、Forms

2023-09-04 08:15:05 作者:強裝無所謂

我一直有这个想法,在.NET中的根命名空间,系统,主要是对的东西,并没有太依赖于特定的平台上。

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.

我想知道如果任何人有任何意见或见解,为什么 Windows.Forms的命名空间是系统而不是微软,因为它似乎是相当盘踞在一个平台上。

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.

(没有火焰战争或不必要的MS扑如果可能的话,请!:))

推荐答案

我读的地方,在系统。* 命名空间是事情是核心的.Net的一部分框架,而微软。* 命名空间是额外的增值的选装件,或东西,是在发展的。

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.

编辑:

布拉德·艾布拉姆斯有一个关于它在自己的博客中讨论What这是否.NET命名空间平均:系统*和Microsoft *

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

此外,从报价的的Visual Basic 2005与.NET 3.0的程序员参考的:

Microsoft根命名空间包含Microsoft特定的项目。从理论上讲,任何厂商都可以实现网络语言,并转化为中间语言(IL)code。如果你要建立这样的语言,在微软命名空间中的项目将一般不适用于你的语言。在系统命名空间中的项目......因为他们是谁使用微软语言的程序员将是有用的语言的用户,但在微软的命名空间中的项目可能不会有帮助。

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.

这将意味着,如果我是做一个新的.NET语言,我将能够利用的 System.Windows.Forms的命名空间,使用户界面,但我可能不会有多大用处类微软。* 命名空间。

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.