これは私のコードです:
protected void Button1_Click(object sender, EventArgs e)
{
Timer1.Enabled = true;
}
int _ta = 0;
protected void Timer1_Tick(object sender, EventArgs e)
{
if (_ta < 1)
{
_ta++;
System.Diagnostics.Debug.WriteLine(_ta);
}
しかし、WriteLine(_ta);
それは一度では止まらず、ただ続くだけです。なんで?どうすればこの効果を達成できますか?
編集:
申し訳ありませんが、私は十分に明確ではありませんでした:
私は意味しました:
System.Diagnostics.Debug.WriteLine(_ta);
_ta が 0 より大きい場合でも、これは引き続き発生します。