MonoDevelop HelloWorld 错误
目前正在关注 monotouch 网站 上的 HelloWorld 教程。
我按照教程添加了以下代码:
int ntaps = 0;
button.TouchDown += delegate {
label.Text = "I have been tapped " (++ntaps) + " times";
};
但是,当我构建时,我收到了与上面代码的第 3 行有关的错误:“表达式表示一个‘值’,其中需要一个‘方法组’”。
有什么想法可能会出问题吗?
Currently following the HelloWorld Tutorial on the monotouch website.
I add the following code as per the tutorial:
int ntaps = 0;
button.TouchDown += delegate {
label.Text = "I have been tapped " (++ntaps) + " times";
};
However, when I build I get this error in regards to line 3 of the code above: "Expression denotes a 'value', where a 'method group' was expected".
Any ideas what might be going wrong?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您在字符串连接中缺少加号运算符:
You're missing a plus operator in the string concatenation:
你错过了“我已被窃听”之后的+;
You're missing the + after "I have been tapped ";