title: CS1061 C# 'Label' does not contain a definition for 'Text
body: <p>I'm new to C# and I got a task that ask of me to use a label for a result. I keep getting error at commented line:</p>
  
  <pre><code>public partial class MainWindow : Window
  {
      public MainWindow()
      {
          InitializeComponent();
      }
  
      private void Button_Click(object sender, RoutedEventArgs e)
      {
          double a, b, c = 0;
  
          a = double.Parse(textBox1.Text);
          b = double.Parse(textBox2.Text);
  
          switch (comboBox1.Text)
          {
              case "+":
                  c = a + b;
                  break;
              case "-":
                  c = a - b;
                  break;
              case "*":
                  c = a * b;
                  break;
              case "/":
                  c = a / b;
                  break;
          }
  
          // error here at .Text
          labelRezultat.Text = c.ToString(); 
      }
  
      private void textBox1_TextChanged(object sender, TextChangedEventArgs e)
      {
          double a;
      }
  
      private void textBox2_TextChanged(object sender, TextChangedEventArgs e)
      {
          double b;
      }
  
      private void comboBox1_SelectionChanged(object sender, SelectionChangedEventArgs e)
      {
          string operacija;
      }
  }
  </code></pre>
  
  <p>This is a WPF app in visual studio 2017. I have made 2 text boxes, one button an one combobox. In that combobox are operations for calculating </p>