Bank account application
<p>I'm trying to create a Bank account application that tracks deposits and withdrawals for a C# course. </p>

<p>The problem I'm having is, it looks like the account balance is being reset (or something). </p>

<p>When you enter a number and click the button, it's (supposedly) added to the balance and displayed in the textbox. Unfortunately, when you enter a number, the number itself is displayed in the textbox. I don't know why.</p>

<p>My code is below: </p>

<pre><code>namespace Assign11
{
using System;

public class BankAccount
{
    private double inValue;
    private double accountBalance;

    public BankAccount()
    {
    }

    public BankAccount(double input)
    {
        inValue = input;
        Deposit();
    }

    public double Invalue
    {
        set
        {
            inValue = value;
        }
        get
        {
            return inValue;
        }
    }

    public double AccountBalance
    {
        get
        {
            return accountBalance;
        }
        set
        {
            accountBalance = value;
        }
    }

    public void Deposit()
    {
        accountBalance = accountBalance + inValue;
    }
  }
}
</code></pre>

<p>I've also got the following form: </p>

<pre><code>namespace Assign11
{
public partial class Form1 : Form
{
    public Form1()
    {
        InitializeComponent();
    }

    private void btn_deposit_Click(object sender, EventArgs e)
    {            
        double input;
        input = double.Parse((putin.Text));

        BankAccount anAccount = new BankAccount(input);

        output.Text = anAccount.AccountBalance.ToString();        
    }
  }
}
</code></pre>
