private void btnNeueGans_Click(object sender, RoutedEventArgs e)
        {
            Gans gans = new Gans();

            cbxTiere.Items.Add(gans);
            cbxTiere.SelectedItem = gans;
        }
示例#2
0
        private void btnNeueGans_Click(object sender, EventArgs e)
        {
            Gans gans = new Gans("Neue Gans");

            gans.EigenschaftGeaendert += Gefluegel_EigenschaftGeaendert;
            cbxTiere.Items.Add(gans);
            cbxTiere.SelectedItem = gans;
        }