title: Basic C# WPF Program - Converting string to double then adding variables in Textblock
body: <p>Good evening all, </p>
  
  <p>I've just started my second year at University and I'm learning C# for the first time. I've had some coding experience with Java and Javascript before but never c#. </p>
  
  <p>I'm having problems with a basic credit/debit program. See code below:</p>
  
  <pre><code>private double balance = 0;
  private string creditamount;
  private string debitamount;
  private double currentamount = 0;
  
  private void CreditButton_Click(object sender, RoutedEventArgs e)
  {
     AmountField.Text = creditamount;
     Convert.ToDouble(creditamount);
     CurrentBalance.Text = "Your current balance is £" + (creditamount + balance);
  }
  
  private void DebitButton_Click(object sender, RoutedEventArgs e)
  {
     AmountField.Text = debitamount;
     double.Parse(debitamount);
     CurrentBalance.Text = "Your current balance is £" + (debitamount - balance);
  }
  </code></pre>
  
  <p>The user should enter an amount into the AmountField and press either the Credit or Debit button. Upon clicking either button, the amount should be converted from a string into a double and then shown in the CurrrentBalance .Text</p>
  
  <p>It apppears that my strings aren't being converted into doubles. </p>
  
  <p>I've tried using Convert.ToDouble(); and double.Parse(); but Visual Studio keeps giving me errors. </p>
  
  <p>Does anyone have any suggestions?</p>