Share via


Max Method (Int32, Int32)

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

Returns the larger of two 32-bit signed integers.

Namespace:  System
Assembly:  mscorlib (in mscorlib.dll)

Syntax

'Declaration
Public Shared Function Max ( _
    val1 As Integer, _
    val2 As Integer _
) As Integer
public static int Max(
    int val1,
    int val2
)
public:
static int Max(
    int val1, 
    int val2
)
static member Max : 
        val1:int * 
        val2:int -> int 
public static function Max(
    val1 : int, 
    val2 : int
) : int

Parameters

Return Value

Type: System. . :: . .Int32
Parameter val1 or val2, whichever is larger.

.NET Framework Security

See Also

Reference

Math Class

Max Overload

System Namespace