how come a namespace includes in the header a more specific namespace?
ex:

using System.Runtime;
using System.Runtime.ConstrainedExecution;
using System.Runtime.InteropServices;
using System.Security;

namespace System
{

    public class Object
    {
      // Class code
    }
}

Shouldn't be like this:

namespace System
{

 namespace Runtime
  {
     namespace ConstrainedExecution
     {

         public class Object
         {
           // Class code
         }
      }
   }
}

This lesson might explain it much better than me.

All the using statement does is allow you to use the classes in that namespace without having to give the fully qualified name. So, for example, the using System.Runtime lets you used the class GCSettings (again, for example) without having to type System.Runtime.GCSettings

ddanbe the tutorial was clear. Thank you.

Glad it helped you out.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.