convert float to int without approximate

Nov 3 2009 5:02 AM
hi everyone,

i want to convert a floating number to integer number without make any approximation ex:-

double x = 2.6;
int y =  Convert.ToInt16(x) ; // output y= 3

all i need that make y= 2

i used this conversion in c++ vs6 the output with me is 2 please help me reach this output

many thanx 


Answers (4)