0
我在编译一个.cs
文件在cmd中窗户的问题。C#编译,引用到其他类
我有一个类Client.cs
,在这个类中我使用了另一个类Student.cs
的实例(它们在同一个包中,所以不需要使用/导入)。
我成功编译的Client.cs与不作为Student.cs
实例文件如下:
C:\WINDOWS\Microsoft.NET\Framework\v3.5\csc.exe Client.cs
当decomment这里我使用的是类编译时,我得到了以下错误消息的实例行:
Client.cs(29,18): error CS0246: The type or namespace name 'Student' could not
be found (are you missing a using directive or an assembly reference?)
我的问题是如何编译我的Client.cs文件与编译器“知道”有关该Student.cs。 我要补充一点,在Visual Studio它工作得很好。谢谢。
尝试引进“使用[namespacename] .Student” – Octane
两个类都在同一个包,VS甚至没有让我“用......”使用与第二类。 – user2271933