Returns the larger of two 8-bit unsigned integers. - CSharp System

CSharp examples for System:Byte

Description

Returns the larger of two 8-bit unsigned integers.

Demo Code

// Copyright (c) 2015 ZZZ Projects. All rights reserved
using System;//  ww w  .  ja va  2s  .co m

public class Main{
        /// <summary>
    ///     Returns the larger of two 8-bit unsigned integers.
    /// </summary>
    /// <param name="val1">The first of two 8-bit unsigned integers to compare.</param>
    /// <param name="val2">The second of two 8-bit unsigned integers to compare.</param>
    /// <returns>Parameter  or , whichever is larger.</returns>
    public static Byte Max(this Byte val1, Byte val2)
    {
        return Math.Max(val1, val2);
    }
}

Related Tutorials