private void timer_Tick(object sender, EventArgs e)
{
label1.Text = DateTime.Now.ToString();
int nu = int.Parse(DateTime.Now.Second.ToString().Substring(1, 1));//截取秒的个位数 运行到第三个9秒的时候就会报
索引和长度必须引用该字符串内的位置。
参数名: length 求问这是为什么?
}
{
label1.Text = DateTime.Now.ToString();
int nu = int.Parse(DateTime.Now.Second.ToString().Substring(1, 1));//截取秒的个位数 运行到第三个9秒的时候就会报
索引和长度必须引用该字符串内的位置。
参数名: length 求问这是为什么?
}
if(s.length>1)
{
s=s.Substring(1,1);
}
private void timer_Tick(object sender, EventArgs e)
{
label1.Text = DateTime.Now.ToString();
string timesm = DateTime.Now.Second.ToString();
if (timesm.Length > 1)
{
timenow =Int32.Parse(timesm.Substring(1, 1));
}
TimepictureBox.Image = big_maptimes[timenow];//换图
}
继续问下,那这样写为什么每次到第三轮了还是会停顿10秒?
何必要写的这么复杂呢