The Byte.MaxValue field in C# is used to represent the largest possible value of a Byte.
Syntax
Following is the syntax −
public const byte MaxValue = 255;
Example
Let us now see an example to implement the Byte.MaxValue field −
using System;
public class Demo {
public static void Main(){
byte val;
val = Byte.MaxValue;
Console.WriteLine("Maximum Value (Byte) = "+val);
}
}Output
This will produce the following output −
Maximum Value (Byte) = 255