Answer: Name Scoping is the property of the namespace which allows the
inner namespace to make use of the types declared in the
outer namespace.
Example,
namespace Home
{
// Outer namespace
namespace Hall
{
class Television { }
class Furniture { }
// Inner namespace
namespace DiningRoom
{
class Tables : Hall.Furniture { }
class Chairs : Hall.Furniture { }
}
}
}
Asked In: Spotted While Learning |
Alert Moderator