怎么老是编译出错????

sonic2001 2001-02-26 03:19:00
我刚刚看C#,动手写了个TEST,才一行代码就报错,怎么回事?我完全按照书上写的做的啊
class test
{
public static void main()
{
system.console.writeline("fuck microsoft");
}
}
然后用csc test.cs编译,结果系统说什么名字空间错误(NAMESPACE)SYSTEM没有定义
难道要先INCLUDE一个什么东东吗?是哪个?该死的书又没说清楚,也许是我太笨了,唉...
PS:我用的是.NET FRAMEWORK


...全文
98 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
gdming 2001-02-27
  • 打赏
  • 举报
回复
C# is a case sensitive language. In your codes, "system.console.writeline("fuck microsoft")", csc can't identify in the namespace.this is my sample code,

using System;

public class Test{
public static void Main(){
Console.WriteLine("Hello, World!");

}
}

csc test.cs

try it, thanks
Ninputer 2001-02-27
  • 打赏
  • 举报
回复
csc /t:exe /r:mscorlib.dll test.cs
sonic2001 2001-02-27
  • 打赏
  • 举报
回复
我用了using System;了,但是错误还在,只是转到using system;这行了,也还是SYSTEM没有定义,大小写我也注意了,还是没用 :(
Edward 2001-02-26
  • 打赏
  • 举报
回复
注意大小些!
main/Main
console/Console
writeln/WriteLine
icecools 2001-02-26
  • 打赏
  • 举报
回复
using System;

110,534

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Web++
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧