使用msc

时间:2015-10-30 11:56:27

标签: c#

我收到此错误消息:

  

类型或命名空间' Test_interface'无法找到

当我尝试编译我的一个类时。让我更具体一点。我有一个接口和一个类,它们在单独的文件中。该类实现了该接口。这就是它的样子:

// Test_interface.cs
namespace Boo{
    interface Test_interface{
        void do_something();
    }
}

// Test_class.cs
// I'm not sure whether I should "include" anything here
namespace Boo{
    class Test_class : Test_interface{
        void do_something(){
            // does nothing
        }
        static void Main(){
            // as simple as null
        }
    }
}

这就是我编译它的方式:

$ msc Test_class.cs

所有这些都会导致错误消息,我在上面提到过。

0 个答案:

没有答案