I see most of the types in .NET framework
are spread across 3 different namespaces (may be more), one start with Microsoft
, other with System
and the third with Windows
.
For example there is Windows.System.Threading.ThreadPool
and System.Threading.ThreadPool
.
Is there a clear cut semantic difference on this design?
The namespace keyword is used to declare a scope that contains a set of related objects. You can use a namespace to organize code elements and to create globally unique types.
Namespaces are used to organize the classes. It helps to control the scope of methods and classes in larger . Net programming projects. In simpler words you can say that it provides a way to keep one set of names(like class names) different from other sets of names.
Microsoft.*
namespaces are typically .NET namespaces for features which are specific to Windows, e.g. registry access
System.*
namespaces are "normal" .NET system namespaces
Windows.*
namespaces are typically part of Windows Runtime aka WinRT (for Windows 8 store apps, Windows Phone 8)
Windows
, is for Windows8 family SDK.
System
is for common .NET namespases.
Microsoft
is for some windows specific OS features.
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