What do you mean by name scoping in C# programming language?

 Posted by Goud.Kv on 9/1/2014 | Category: C# Interview questions | Views: 1443 | Points: 40
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 

Comments or Responses

Login to post response