How to remove unused using namespaces

后端 未结 9 1784
刺人心
刺人心 2020-12-07 22:14

I am using visual studio 2010 and was wondering if there is a way to automatically remove all the namespaces that aren\'t being used at the the top of the page e.g.

9条回答
  •  鱼传尺愫
    2020-12-07 23:12

    For VS 2019 or ReSharper. If you add an unused using to the top of a file such as using System.IO; a light bulb appears. Clicking on the light bulb gives the option to remove the unused usings from either the file, folder, project or entire solution.

提交回复
热议问题