What's the advantage of doing this:
namespace a
{
using System;
class ClassA
{
}
}
over this
using System;
namespace a
{
class ClassA
{
}
}
is there any performance advantage or best practices?
What's the advantage of doing this:
namespace a
{
using System;
class ClassA
{
}
}
over this
using System;
namespace a
{
class ClassA
{
}
}
is there any performance advantage or best practices?
There's definitely no performance difference at runtime since namespace resolution is done at compile time, and I doubt there's a significant compile time difference either.
All the C# code I've seen has the using
statements at the top of the file, so I'd consider that more "normal".