I want to show number conversion double
to int
. But I am confused. Here is my codes.
private void tbxDouble_TextChanged(object sender, EventArgs e)
{
tbxInt.Text = Convert.ToDouble(tbxDouble.Text).ToString("F0");
tbxInt2.Text = Math.Round(Convert.ToDouble(tbxDouble.Text),0).ToString();
}
Results for 100,5 => 101 and 100
Results for 100,56 => 101 and 101
Results for 100,49 => 100 and 100
Why all results aren't 101? what is wrong with that?