编译器错误 CS0234

更新:2007 年 11 月

错误消息

命名空间“namespace”中不存在类型或命名空间名称“name”(是否缺少程序集引用?)

应为某个类型。可能的原因包括:

有关如何在开发环境中添加引用的信息,请参见“添加引用”对话框

下面的示例生成 CS0234:

// CS0234.cs
public class C
{
   public static void Main()
   {
      System.DateTime x = new System.DateTim();   // CS0234
      // try the following line instead
      // System.DateTime x = new System.DateTime();
   }
}