Ahmet Taha

Ahmet Taha

  • NA
  • 381
  • 20.6k

looping in c#,net in winform not console

Apr 13 2021 3:30 AM
 Hello Guyz, could anyone help me to find the solution of my problem? Thanks in advance (the sample is attached here)
i try but doesn't work
private void txtinput_KeyPress(object sender, KeyPressEventArgs e)
{
if (!(Char.IsDigit(e.KeyChar) || (e.KeyChar == (char)Keys.Back)))
{
int a = Convert.ToInt32(txtinput.Text);
// var str = array.join(',');
// int a = Convert.ToInt32(txtinput.Text);
for (int i = a; i >= 1; i--)
{
label1.Text =string.Join.ToString(i);
}
e.Handled = true;
}
}
 
 

Answers (3)