Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home/myscript/public_html/classes/classdb.php on line 42
Math.Min Function in VB.NET

Math.Min Function in VB.NET

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

Explanation

Math.Min Function

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

Math.Min( val1, val2)

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

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))
Console.ReadLine()
End Sub
End Module
Result:

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