共用方式為


編譯器錯誤 CS0104

更新:2007 年 11 月

錯誤訊息

'reference' 是 'identifier' 和 'identifier' 之間模稜兩可的參考

您的程式包含兩個命名空間的 using 指示詞,且您的程式碼會參考在這兩個命名空間都會出現的名稱。

下列範例會產生 CS0104:

// CS0104.cs
using x;
using y;

namespace x
{
   public class Test
   {
   }
}

namespace y
{
   public class Test
   {
   }
}

public class a
{
   public static void Main()
   {
      Test test = new Test();   // CS0104, is Test in x or y namespace?
      // try the following line instead
      // y.Test test = new y.Test();
   }
}