title: Output not generating results in C#
body: <p><strong>Problem:</strong> An application that lets you enter an employee's gross pay and bonus amount and calculates the amount of retirement contribution. </p>
  
  <p>My code:</p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  using System.ComponentModel;
  using System.Data;
  using System.Drawing;
  using System.Linq;
  using System.Text;
  using System.Threading.Tasks;
  using System.Windows.Forms;
  
  namespace Boolean_Method_Application
  {
      public partial class Form1 : Form
  
      {
          private const decimal CONTRIB_RATE = 0.05m;
      public Form1()
          {
              InitializeComponent();
          }
          // The InputIsValid method converts the user input and stores
          //// it in the arguments (passed by reference). If the conversion
          ///// is successful, the method returns true. Otherwise it returns
          //// false. 
          private bool InputIsValid(ref decimal pay, ref decimal bonus)
          {
              bool inputGood = false;
              if (decimal.TryParse(grossPayTextBox.Text, out pay))
              {
                  if (decimal.TryParse(bonusLabel.Text, out bonus))
                  {
                      inputGood = true;
                  }
                  else
                  {
                      MessageBox.Show("Bonus amount is invalid.");
                  }
              }
              else
              {
                  MessageBox.Show("Gross pay is invalid.");
              }
              return inputGood;
          }
  
          private void calculateButton_Click(object sender, EventArgs e)
          {
              decimal grossPay = 0m, bonus = 0m, contributions = 0m;
              if (InputIsValid(ref grossPay, ref bonus))
                  {
                  contributions = (grossPay + bonus) * CONTRIB_RATE;
                  contributionLabel.Text = contributions.ToString("c");
              }
  
          }
  
          private void exitButton_Click(object sender, EventArgs e)
          {
              this.Close();
          }
      }
  }
  </code></pre>
  
  <p><strong>This issue:</strong> The code seems to be correct, however every time I input data and click on calculate I keep getting this message:  "Bonus amount is invalid". Is the code not properly written or what exactly is happening. Am I not inputting the right data?</p>