C# Math Min(UInt32, UInt32)
Description
Math Min(UInt32, UInt32)
returns the smaller of two 32-bit
unsigned integers.
Syntax
Math.Min(UInt32, UInt32)
has the following syntax.
[CLSCompliantAttribute(false)]/* w w w.j ava2 s . c o m*/
public static uint Min(
uint val1,
uint val2
)
Parameters
Math.Min(UInt32, UInt32)
has the following parameters.
val1
- The first of two 32-bit unsigned integers to compare.val2
- The second of two 32-bit unsigned integers to compare.
Returns
Math.Min(UInt32, UInt32)
method returns Parameter val1 or val2, whichever is smaller.
Example
The following example demonstrates how to use the Min method to return and display the smaller of two variables.
using System;/*from ww w. java 2s . c om*/
class Sample
{
public static void Main()
{
uint xUint1 = 103, xUint2 = 113;
Console.WriteLine(Math.Min(xUint1, xUint2));
}
}
The code above generates the following result.