What is the difference between namespace dot namespace and nested namespace?

Is there any difference between:

namespace Outer.Inner
{
}

And

namespace Outer
{
    namespace Inner
    {
    }
}

in C#?

Jon Skeet
people
quotationmark

Assuming you don't put any other declarations or using directives in the Outer namespace, there's no difference at all.

Given that you would very very rarely declare members in multiple namespaces within a single file, I'd suggest using the first form - aside from anything else it saves a level of indentation. Note that "brace at the start of a new line" is a more conventional bracing style for C# though:

namespace Outer.Inner
{
    ...
}

people

See more on this question at Stackoverflow