Hi,
namespace WindowsFormsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
int Eingabezahl = 0;
int Ergebnis = 0;
try
{
Eingabezahl = Convert.ToInt32(textBox1.Text);
Ergebnis = Eingabezahl * 2;
label1.Text = Ergebnis.ToString();
}
catch { label1.Text = "Zahlen Diggah, Zahlen"; }
}
private void button1_Click(object sender, EventArgs e)
{
int Eingabezahl = 0;
int Ergebnis = 0;
try
Eingabezahl = Convert.ToInt32(textBox1.Text);
Ergebnis = Eingabezahl * 3;
label1.Text = Ergebnis.ToString();
}
private void button1_Click(object sender, EventArgs e)
{
int Eingabezahl = 0;
int Ergebnis = 0;
try
Eingabezahl = Convert.ToInt32(textBox1.Text);
Ergebnis = Eingabezahl / 2;
label1.Text = Ergebnis.ToString();
}
private void Rechner_Load(object sender, EventArgs e)
{
}
}
}
Ich habe das Problem , das ich einmal z.b. 2x2 nehmen kann ( x3 und /2 geht erst gar nicht ) danach geht nichts mehr.
Wenn ich das selbe nur mit einem Button code, kann ich denn immer wieder drücke und es geht ohne das Programm neustarten zu müssen.
Woran kann das denn liegen?