What do you mean by repeated namespaces in C# programming language?

 Posted by Goud.Kv on 9/1/2014 | Category: C# Interview questions | Views: 1472 | Points: 40
Answer:

There is a possibility of repeating namespaces until the types of that namespace doesn't get conflict.

Example,
namespace Home.Hall.Television

{
class Channel1 { }
}
namespace Home.Hall.Television
{
class Channel2 { }
}

We can also divide the above example as two source files such as,

Channel-1:
namespace Home.Hall.Television

{
class Channel1 { }
}

and,

Channel-2:
namespace Home.Hall.Television

{
class Channel2 { }
}


Asked In: Spotted While Learning | Alert Moderator 

Comments or Responses

Login to post response