A .NET programmer is allowed to wrap code inside namespaces and also to use a namespace already defined, even those defined by Microsoft in the Framework or Base Class Library. For example if I were to use System.Windows.Forms to outline this idea:
Reference in assembly System.Windows.Forms.dll
// This is my own C# source code file.
using System.Windows.Forms;
namespace System.Windows.Forms { // In Microsoft's FCL and now in my file.
/* Define my custom classes and such in here.
* (I'm kind of playing inside Microsoft's "sandbox" now.)
*/
}
So is this practice okay? What are some good arguments for or against it?
Edit: I'm making this question language agnostic because it applies to any syntax that supports namespaces in .NET.
Update: Because answers ask why: for example, I might want to put custom code into Microsoft's System.Web.UI namespace to add extension methods to the System.Web.UI.Page class to manipulate any Web Form in my ASP.NET project. Arguably I could put those extension methods into a custom namespace and use it instead; however System.Web.UI is already being used in all ASP.NET pages so the extension methods are immediately available to all Web forms without modification -yes, a quick convenience - I don't have to add another C# using to each file. (Anybody have a better example?)