Forms.TextBox rcislo; Forms.Label label1; Forms.Button button1; Forms.Label vysledek; Forms.PictureBox obrazek;
int cislo = int.Parse(rcislo.Text); if (cislo % 11 == 0) { vysledek.Text = "OK"; obrazek.Visible = false; } else { vysledek.Text = "NO"; obrazek.Visible = true; }
int myInt; bool isNumerical = int.TryParse(rcislo.Text, out myInt); if (isNumerical) { vysledek.Text = myInt.ToString() + " je číslo"; } else { vysledek.Text = myInt.ToString() + " není číslo"; }