0

I want namespace position change when each new namespace added. but I dont know how to do it.

Normally namespaces list is over the namespace define row but I want automatic add namespace list under the namespace define row.

I'm always moved the namespace list under the namespace define row but boring this method.

How I automatic to do it?

enter image description here

muratoner
  • 2,316
  • 3
  • 20
  • 32

1 Answers1

0

I will tell you what I have done.

Go to :

C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\ItemTemplates\CSharp\Code\1033\Class

I am using VS2013, so I go to Microsoft Visual Studio 14.0 folder.

The Class.cs file is the template for the new classes that get created. In this file move the namespace bit around and voila !!

This will do:

namespace $rootnamespace$
{
    using System;
    using System.Collections.Generic;
    $if$ ($targetframeworkversion$ >= 3.5)using System.Linq;
    $endif$using System.Text;
    $if$ ($targetframeworkversion$ >= 4.5)using System.Threading.Tasks;
    $endif$

    class $safeitemrootname$
    {
    }
}
Alok
  • 1,290
  • 1
  • 11
  • 21