>>Math.Abs(value)
>
>I tried that but that is not the same as the VFP CInt() function. Math.Abs(0.39) would return the same value. There must be something I am missing here. I am looking for the 0 value here. As, everything between 0 to 0.99, I would like to obtain 0. So, would be from all values between 1 to 1.99 would return 1.
You don't want Abs( ), you want the .Net equivalent of the VFP FLOOR( ) function.
Although, for your purposes Int( ) should work. They do differ for negative numbers e.g.
INT( 1.99 ) = 1
FLOOR( 1.99 ) = 1
INT( -1.99 ) = -1
FLOOR( -1.99 ) = -2
FLOOR( -2.01 ) = -3
Regards. Al
"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov
Neither a despot, nor a doormat, be
Every app wants to be a database app when it grows up