评论会员:米卡Wendelius 时间:2012/02/05
如果得分是一个整型变量的例子,你可以简单地调用:
MessageBox.Show("Your score is: " + variable.ToString(), "My game", MessageBoxButtons.OK, MessageBoxIcon.Information);
MessageBox.Show("Your score is: " + variable.ToString(),
Application.ProductName,
MessageBoxButtons.OK,
MessageBoxIcon.Information);
评论会员:SAKryukov 时间:2012/02/05
改善米卡解决方案:
{C}
使用的Application.ProductName只可能为System.Windows.Forms
(请务必始终标记您的UI库。是WPF或形式?)
对于WPF,您可以使用乙醚一些字符串常量,而不是(最好是从资源)或创建应用程序的属性相同的属性,你通常写在"AssemblyInfo.cs中。"
mdash; SA