a query on c#

  • Thread starter Thread starter Atul Sharma
  • Start date Start date
A

Atul Sharma

namespace aa
{
class aa
{
}

is this possible in c#

can namespace's name be same as Its one if the class's
name?
 
Atul Sharma said:
namespace aa
{
class aa
{
}

is this possible in c#

can namespace's name be same as Its one if the class's
name?

Yes - but it makes things considerably more complicated when it comes
to referring to the class elsewhere.

In short, you *can* do it, but it's a really bad idea.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top