I can't understand the difference between Convert.ToInt32
and Parsing (int) command when i convert a double number to a int number.My example code is here and i have two different answer when i show it.
class Program
{
static void Main(string[] args)
{
double i = 3.897456465;
int y;
y = Convert.ToInt32(i);
Console.WriteLine(y);
y = (int)i;
Console.WriteLine(y);
Console.ReadKey();
}
}