private void textBox4_TextChanged(object sender, EventArgs e)
{
Double d;
if (!string.IsNullOrWhiteSpace(textBox4.Text))
{
d = Convert.ToDouble(textBox4.Text);
var c = d / 1;
if (c == 0.75)
{
string myString = c.ToString();
}
else if (c == 0.25)
{ }
else if (c == 0.50) { }
else if (c == 0.00) { }
else { MessageBox.Show("you can't enter this"); }
}
}
ok so i fixed that error but every time i enter a number the messagebox shows you cant enter this , even though d=5.0/1 = 0 and d=0.75/1 = 0.75 and i don't know why
any help would be appreciated