I am using Mvc framework and i want to migrate vb code to c#. Right now i want to use** FIX ** function equivalent in c#
Example:- Vb Code
result.ReducedDegrees= Fix(dblReducedAngle)
result.ReducedMinutes = Fix((dblReducedAngle - Fix(dblReducedAngle)) * 60)
I want to get result in c#
The Fix function removes the fractional part of a numeric expression. Closely the same functionality as Int, except the Fix method has a special clause at the bottom:
If Number is negative, Fix returns the first negative integer greater than or equal to Number.
In C#, there is the Math.Truncate method which you can use. It has the same properties as VB's Fix method.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With