Exception thrown: System.FormatException
in mscorlib.dll
{"Input string was not in a correct format."}
I have been at this all day. Please help! Those above were the error messages btw. I am a bit new to C# so I could use a bit more detailed answers (I don't get the jargon so well)
public partial class Form1 : Form
{
double a, b, d, f, g, t;
string z;
int c;
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, System.EventArgs e)
{
}
private void button7_Click(object sender, EventArgs e)
{
a = Convert.ToDouble(textBox18.Text);
z = Convert.ToString(comboBox1);
d = Convert.ToDouble(checkBox1);
f = Convert.ToDouble(textBox13.Text);
g = Convert.ToDouble(textBox14.Text);
t = Convert.ToDouble(textBox19.Text);
if (z == "a")
{
textBox15.Text = Convert.ToString(a * g * d * t);
}
else if (z == "b")
{
textBox15.Text = Convert.ToString(c);
}
}