C# Math Min(SByte, SByte)
Description
Math Min(SByte, SByte)
returns the smaller of two 8-bit
signed integers.
Syntax
Math.Min(SByte, SByte)
has the following syntax.
[CLSCompliantAttribute(false)]//from w w w . j av a 2 s. c om
public static sbyte Min(
sbyte val1,
sbyte val2
)
Parameters
Math.Min(SByte, SByte)
has the following parameters.
val1
- The first of two 8-bit signed integers to compare.val2
- The second of two 8-bit signed integers to compare.
Returns
Math.Min(SByte, SByte)
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.
//from www .j a v a2 s.co m
using System;
class Sample
{
public static void Main()
{
sbyte xSbyte1 = 101, xSbyte2 = 111;
Console.WriteLine(Math.Min(xSbyte1, xSbyte2));
}
}
The code above generates the following result.