私はC#を初めて使用し、Javaの基本的な知識はありますが、このコードを正しく実行できません。
これは単なる基本的な計算機ですが、プログラムを実行すると、VS2008で次のエラーが発生します。

私はほぼ同じプログラムを実行しましたが、JavaではJSwingを使用しており、完全に機能しました。
これがc#の形式です:

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace calculadorac
{
    public partial class Form1 : Form
    {
    int a, b, c;
    String resultado;
    public Form1()
    {
        InitializeComponent();
        a = Int32.Parse(textBox1.Text);
        b = Int32.Parse(textBox2.Text);
    }
    private void button1_Click(object sender, EventArgs e)
    {
        add();
        result();
    }
    private void button2_Click(object sender, EventArgs e)
    {
        substract();
        result();
    }
    private void button3_Click(object sender, EventArgs e)
    {
        clear();
    }
    private void add()
    {
        c = a + b;
        resultado = Convert.ToString(c);
    }
    private void substract()
    {
        c = a - b;
        resultado = Convert.ToString(c);
    }
    private void result()
    {
        label1.Text = resultado;
    }
    private void clear()
    {
        label1.Text = "";
        textBox1.Text = "";
        textBox2.Text = "";
    }
}
何が問題になる可能性がありますか?それを解決する方法はありますか?
PS:私も試しました
a = Convert.ToInt32(textBox1.text);
b = Convert.ToInt32(textBox2.text);
そしてそれはうまくいきませんでした。