Fix : Number Function « Data Type « VB.Net Tutorial






Option Strict On

Public Module FixTest
   Public Sub Main()
      Dim arr() As Decimal = {12.6d, 12.1d, -12.1d, -12.6d}
      For Each num As Decimal In arr
         Console.WriteLine("Fix({0}): {1}", num, Fix(num))
         Console.WriteLine("Int({0}): {1}", num, Int(num))
         Console.WriteLine()
      Next
   End Sub
End Module
Fix(12.6): 12
Int(12.6): 12

Fix(12.1): 12
Int(12.1): 12

Fix(-12.1): -12
Int(-12.1): -13

Fix(-12.6): -12
Int(-12.6): -13








2.44.Number Function
2.44.1.CInt
2.44.2.Fix
2.44.3.Math.Round with IRR
2.44.4.CInt: convert Hexadecimal in string to int