更新:2007 年 11 月
错误消息
不能重新定义全局外部别名
全局别名已被定义为包括所有的非别名引用,因此不能重新定义。
示例
下面的示例生成 CS1681。
// CS1681.cs
// compile with: /reference:global=System.dll
// CS1681 expected
// try this instead: /reference:System.dll
class A
{
static void Main() {}
}
更新:2007 年 11 月
不能重新定义全局外部别名
全局别名已被定义为包括所有的非别名引用,因此不能重新定义。
下面的示例生成 CS1681。
// CS1681.cs
// compile with: /reference:global=System.dll
// CS1681 expected
// try this instead: /reference:System.dll
class A
{
static void Main() {}
}