namespace USteuerbetragSwitch
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void CmdBerechnen_Click(object sender, EventArgs e)
        {
            double gehalt = Convert.ToDouble(TxtGehalt.Text);
            LblSteuerbetrag.Text = "Steuerbetrag: " + gehalt / 100
                * gehalt switch
                {
                    <= 12000 => 12,
                    <= 20000 => 15,
                    <= 30000 => 20,
                    _ => 25
                };
        }
    }
}
