[c#] Converting a double to an int in C#

ToInt32 rounds. Casting to int just throws away the non-integer component.