[英]C# newline constant error upon trying to compile
出于某些原因,当我尝试使用Visual Studio命令提示符将.cs文件编译为.dll时,由于某种原因尝试进行编译时,我会收到new line constant error
。
+ feet"
后不喜欢分号+ feet"
。
知道为什么吗?
这是我的代码:
/* A simple C# class! */
public class Tree
{
public int height = 0;
public void Grow(int h)
{
height += h;
}
public string Message()
{
return "The height of tree1 is:<br/>" + tree1.height + feet";
}
}
你需要另一只脚
public string Message()
{
return "The height of tree1 is:<br/>" + tree1.height + "feet";
}
编辑:实际上是在抱怨以“;开头的最后一个字符串没有终止。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.