Die Eingabezeichenfolge hatte nicht das richtige Format "double.parse (textbox.text)".

Hallo, bin ein Neuling in visuellen Studios.

Dies ist mein Code, um ein Beispiel für einen Geldautomaten zu machen, ich habe ein Textfeld und ich habe einen Betrag eingegeben und dann habe ich diese Schaltfläche, wo ich auf Guthaben klicke und es fügt den Betrag zu einem Etikett namens Guthaben und ich habe auch ein Knopf namens debit, der das Geld vom Guthaben nimmt. Ich mache das in wpf c #

Soweit habe ich das.

    namespace BankAccounts
     {
     /// <summary>
     /// Interaction logic for MainWindow.xaml
     /// </summary>
     public partial class MainWindow : Window
     {
       public MainWindow()
    {
        InitializeComponent();
    }

    private double totalamount = 0;
    public string balance1;


    private void buttoncredit_Click(object sender, RoutedEventArgs e)
    {
        totalamount = totalamount + double.Parse(textboxamount.Text)

        balance1 = "Your Balance is: £";

        label2.Content = balance1 + totalamount;

        textboxamount.Clear();



    }

    private void buttondebit_Click(object sender, RoutedEventArgs e)
    {
        if (totalamount - double.Parse(textboxamount.Text) < 0)
        {
            MessageBox.Show("Overdraft Limit is not set please contact Customer Services");
        }

        else
        {

            totalamount = totalamount - double.Parse(textboxamount.Text);

            balance1 = " Your Balance is: £";

            label2.Content = balance1 + totalamount;



            textboxamount.Clear();
        }
    }

    private void listboxtransactions_SelectionChanged(object sender, SelectionChangedEventArgs e)
    {



    }
}

}