VB.Net program to demonstrate the Fix() function

Here, we are going to demonstrate the Fix() function in VB.Net.
Submitted by Nidhi, on December 04, 2020

The Fix() function is used to get the integer portion from the specified double number.




  • num: Specified double number.

Return Value:

The Fix() function will return the integer portion of the given number.

Program/Source Code:

The source code to demonstrate the Fix() function is given below. The given program is compiled and executed successfully.

'VB.Net program to demonstrate the Fix() function.

Module Module1

    Sub Main()
        Dim val As Double = 32.53
        Dim ret As Double = 0

        ret = Fix(val)

        Console.WriteLine("Result: {0}", ret)
    End Sub

End Module


Result: 32
Press any key to continue . . .


In the above program, we created a module Module1 that contains a Main() method. In the Main() method, we created two variables val and ret. Here, variable val is initialized with 32.53 and variable ret is initialized with 0.

ret = Fix(val)

In the above code, we used the Fix() function that will return the integer portion of the given number.

Then we printed the character on the console screen.

VB.Net Basic Programs »



Comments and Discussions



Languages: » C » C++ » C++ STL » Java » Data Structure » C#.Net » Android » Kotlin » SQL
Web Technologies: » PHP » Python » JavaScript » CSS » Ajax » Node.js » Web programming/HTML
Solved programs: » C » C++ » DS » Java » C#
Aptitude que. & ans.: » C » C++ » Java » DBMS
Interview que. & ans.: » C » Embedded C » Java » SEO » HR
CS Subjects: » CS Basics » O.S. » Networks » DBMS » Embedded Systems » Cloud Computing
» Machine learning » CS Organizations » Linux » DOS
More: » Articles » Puzzles » News/Updates

© some rights reserved.