C#: Same "using" in multiple files
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 = 开发者_如何学GoFooInc.FooProd.SomeClass;
) and would love not to have to Ctrl+C, Ctrl+V them in each file.
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.
Unfortunately, you cannot do that with C# at this time - the directory must be present in any file you use... unless you make an automater for that.
精彩评论