hi guyz! is there any function in C#.net that is equivalent to FIX function in VB.net. Thanks in advance!
Printable View
hi guyz! is there any function in C#.net that is equivalent to FIX function in VB.net. Thanks in advance!
The Fix function returns an integral value by rounding a number towards zero. Math.Truncate also rounds a number towards zero. The difference is that Fix accepts a parameter of any numerical type and returns a value of the same type, while Math.Truncate only accepts Double and Decimal parameters and returns a value of the same type. Given that there's not much point rounding a type that cannot have a fractional part that is not really a problem. The one thing that may be of interest is that Single values will be converted to Double.
Ok thanks!!! you're such a really great elp to me jmcilhinney!!! really thanks!