Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p><a href="http://www.jetbrains.com/resharper/download/" rel="nofollow noreferrer">Resharper</a> is capable of doing this.</p> <p>Although Resharper is not free, it is absolutely worth buying. Once started using Resharper, you will not be able to proceed without it.</p> <p>Showing the step by step below, because it is not quite trivial how to do this:</p> <ol> <li>Download and install Resharper.</li> <li><p>Open VS and go to menu <code>Rehsarper</code> => <code>Options</code> => <code>Languages</code> => <code>C#</code> => <code>Namespace Import</code>. Select <code>Use fully qualified names</code>. By default <code>Insert using directives when necessary</code> is selected.</p> <p><img src="https://i.stack.imgur.com/YzQBf.png" alt="enter image description here"></p> <p>From now on, whenever you use <code>Alt+Enter</code> to resolve namespace, Resharper will resolve fully qualified one.</p></li> <li><p>Go to <code>Rehsarper</code> => <code>Options</code> => <code>Tools</code> => <code>Code cleanup</code>. Hit <code>Add</code> button to add new Cleanup profile. Give a name to the new profile, e.g. <code>Namespaces Reformat</code>. Check <code>Optimizing using directives</code> checkbox. <img src="https://i.stack.imgur.com/5HsxG.png" alt="enter image description here"></p></li> <li><p>Right click on the project and select <code>Cleanup Code...</code>, or use shortcut <code>Ctrl+E, Ctrl+C</code>. Select previously created profile and hit <code>Run</code> button.</p> <p><img src="https://i.stack.imgur.com/GGLob.png" alt="enter image description here"></p></li> </ol> <hr> <p>Test</p> <p>Original code:</p> <pre><code>using System; namespace ConsoleApplication5 { class Program { static void Main(string[] args) { Console.WriteLine("Test"); } } } </code></pre> <p>Result code:</p> <pre><code>namespace ConsoleApplication5 { class Program { static void Main(string[] args) { System.Console.WriteLine("Test"); } } } </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload