Min Function |
System.Math
Math.Min( val1 , val2 )
A numeric data type or expression
Returns the minimum of val1 and val2 in the widest data type of the two numbers
Returns the minimum of val1 and val2 , in the same data type as the numbers. See Section for more detail.
If the two arguments do not have the same data type, then the narrower data type is cast to the wider type. For instance, the code fragment:
Dim x As Integer = 5 Dim y As Double = 454.8 MsgBox(Math.Min(x, y))
displays 454.8 without error. The datatype returned by the function in this instance is a Double.
This is a Shared member, so it can be used without creating any objects.
The Min function is new to the .NET Framework.
Max Function