In dem nachfogenden Programm funktioniert butto2 nicht und gibt nicht den Text "Das tur mir leid!" aus. Kann mir jemand sagen was sich falsch mache?
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace WindowsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
label1.Text = "Das freut mich!";
}
private void button2_Click(object sender, EventArgs e)
{
label1.Text = "Das tur mir leid!";
}
}
}
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace WindowsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
label1.Text = "Das freut mich!";
}
private void button2_Click(object sender, EventArgs e)
{
label1.Text = "Das tur mir leid!";
}
}
}