newbody
Ich wollte als Anfänger mir einen wirtschaftlichen taschenrechner machen:
Also es gibt buttons die geben Sachen in die TExtbox 1 ein
drückt man z.B den -button:
private void button12_Click(object sender, EventArgs e)
{
//-Button
Eingabe = Convert.ToInt32(textBox1.Text);
//löscht den Inhalt der Textbox
textBox1.Text = ("");
this._action = 1;
}
Wenn man das = drückt als button wird durch this.action folgendes ausgeführt:
void Action1()
{
Eingabe2 = Convert.ToInt32(textBox1.Text);
textBox1.Text = "";
Ausgabe = Eingabe - Eingabe2;
textBox1.Text = Ausgabe.ToString();
}
Aber es klappt nicht!
Es kommt immer:
Die Eingabezeichenfolge hat das falsche Format.
makiert ist dabei
Eingabe2 = Convert.ToInt32(textBox1.Text);
Was kann ma tuen
THX
Gigi
Also es gibt buttons die geben Sachen in die TExtbox 1 ein
drückt man z.B den -button:
private void button12_Click(object sender, EventArgs e)
{
//-Button
Eingabe = Convert.ToInt32(textBox1.Text);
//löscht den Inhalt der Textbox
textBox1.Text = ("");
this._action = 1;
}
Wenn man das = drückt als button wird durch this.action folgendes ausgeführt:
void Action1()
{
Eingabe2 = Convert.ToInt32(textBox1.Text);
textBox1.Text = "";
Ausgabe = Eingabe - Eingabe2;
textBox1.Text = Ausgabe.ToString();
}
Aber es klappt nicht!
Es kommt immer:
Die Eingabezeichenfolge hat das falsche Format.
makiert ist dabei
Eingabe2 = Convert.ToInt32(textBox1.Text);
Was kann ma tuen
THX
Gigi