这是什么,我不明白,如果我在代码块中放入任何任意字符串,它会抛出一些编译时错误,但如果我放入类似下面的东西,它不会。
static void Main(string[] args)
{
int i = 5;
ghfhfghfghfghfhfghfhfghfghfghfhfghfghfghghttp://www.google.com
Console.WriteLine(i.ToString());
Console.ReadLine();
}
知道为什么会这样吗?我只是偶然发现它,不知道为什么,可能是我错过了什么。
最佳答案
那是一个标签。
看:
在最后。
如果您删除 :
到底。它不会编译
goto and label
关于c# - 代码块内的任意且无意义的字符串,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18652655/