C#: Same “using” in multiple files

后端 未结 2 896
挽巷
挽巷 2021-01-27 13:42

This is probably not the smartest question, but can you reuse the same using directives in multiple C# files? I have several \"typedefs\" (using foo = FooInc.

2条回答
  •  甜味超标
    2021-01-27 14:08

    There is nothing out-of-the box that will do that, but you can have Visual Studio generate usings for you on the fly as you code by right-clicking a type name underlined with a red squiggle and selecting "Resolve > using ...".

    I find that if I do this, I don't often long for a feature that lets me auto copy/paste usings.

提交回复
热议问题