Math.Min Function in VB.NET

What is the use of math.min() mathematical function in VB.NET?


Math.Min Function

Math.Min() Mathematical Function in Visual 2008 is used to return the smallest of two decimal numbers.

Math.Min( val1, val2)

In the above syntax val1 and val2 are the two decimal values to find the smallest among them.

Module Module1
Sub Main()
Dim a As Double = 25.45
Dim b As Double = 34.56
Console.WriteLine("Smallest decimal value is::"
& Math.Min(a, b))
End Sub
End Module

Smallest decimal value is::25.45

In the above example, the smallest decimal value assigned to 'a' is returned.

Visual Basic Tutorial

Ask Questions

Ask Question