i avoid namespaces in C# because of the extra indentation

what’d be nice if there was an option in visual studio to NOT INDENT namespaces like we indent other blocks.

so it’d be like


namespace ns
{
class c
{
  public static int x ;
  public void method()
  {
    if( x == 5 )
    {
      Console.WriteLine("Everything indents normally except for the NAMESPACE");
    }
  }
}
}

I still think Java’s package statement is by far superior notation because it doesn’t indent the whole file. namespace declarations that were Java-like WERE ALLOWED in .NET 1, but they’re not allowed anymore.

Post a Comment