C# Extension Method: Byte - Max

CSharp · Console

/Program.cs

// C# Extension Method
// Doc: https://csharp-extension.com/en/method/1002187/byte-max

// @nuget: Z.ExtensionMethods

using System;
					
public class Program
{
	public static void Main()
	{
		string str = "{0}: The greater of {1} and {2} is {3}.";
		
		byte xByte1 = 1, xByte2 = 51;
		
		// C# Extension Method: Byte - Max
		var result = xByte1.Max(xByte2);
		
		Console.WriteLine(str, "Byte", xByte1, xByte2, result);
	}
}
;