类型如何转换
c# winform下:
if (_score >= 10000 * nLevel)
{
nLevel++;//关数加1
timeSpan -= 80; //速度减80
StringFormat drawFormat = new StringFormat();
drawFormat.Alignment = StringAlignment.Center;
gpRun.DrawString("第 "+nLevel.ToString()+" 关",
new Font("Arial Black", 25f,FontStyle.Bold),
new SolidBrush(Color.White),
new RectangleF(0, _height * rectPix / 2 - 100, _width * rectPix, 100),
drawFormat);
drawFormat.Dispose();
timerBlock.Enabled = false;
Thread.Sleep(2000);
timerBlock.Enabled = true;
if (IsEnd)
{
FrmTetris ft = new FrmTetris();
FrmTetris f = new FrmTetris();
f.U = _score.ToString;
}
错误提示:错误 1 无法将方法组“ToString”转换为非委托类型“string”。您是要调用方法吗? G:\bishe\Tetris2\Tetris2\Palette.cs 283 31 Tetris2