title: C# Windows forms - Assigning textBox value (numerical) from local variable
body: <p>This method is decreasing value of textBox1 for amount inserted in textBox2. If there isn't enough "money" in textBox1, excessing amount should be taken from textBox3. At the end, method should update textboxes to new values, but only textBox2 is cleared, and textBox1 and textBox3 remain unchanged. Can anyone tell me why <code>textBox1.text = Account.toString()</code> doesn't assign textbox value to value from variable <code>Account</code> and <code>textBox3.text = Savings.toString()</code> doesn't assign textbox value to value from variable <code>Savings</code>?</p>
  
  <pre><code>public void Debit(decimal amount)
      {
          decimal Account = Convert.ToDecimal(textBox1.Text);
          decimal Savings = Convert.ToDecimal(textBox3.Text);
  
          if ((Account + Savings) &lt; amount)
              if (Overdrawn != null)
                  Owerdrawn(this, new OverdrawnEventArgs (Account, amount));
          else if (Account &gt;= amount)
              Account -= amount;
          else {
              amount -= Account;
              Account = 0m;
              Savings -= amount;
          }
          textBox1.Text = Account.ToString();
          textBox2.Clear();
          textBox3.Text = Savings.ToString();
      }
  </code></pre>