c# – 在另一个文件中使用别名

是否可以在整个程序集中使用在一个文件中定义的别名?

例如。 在Foo.cs我有

using IO = System.IO; namespace Foo {} 

如何在FooBar.cs中使用别名“IO”

 namespace Foo.Bar {} 

根据MSDN

The scope of a using directive is limited to the file in which it appears.

所以答案是否定的。您无法在一个文件中定义别名并在整个程序集中使用它