C# | Byte.MaxValue Field Last Updated : 23 Apr, 2019 Comments Improve Suggest changes Like Article Like Report The MaxValue field of Byte Struct is used to represent the maximum value of the byte data type. The value of this field is constant means that the user cannot change the value of this field. The value of this field is 255. Its hexadecimal value is 0xFF. Syntax: public const byte MaxValue = 255; Return Value: This field always returns 255. Example: CSharp // C# program to illustrate the // Byte.MaxValue Field using System; class GFG { // Main Method static public void Main() { // display the Maximum // value of Byte struct Console.WriteLine("Maximum Value is: " + Byte.MaxValue); // taking a variable byte var1 = 255; if (var1.Equals(Byte.MaxValue)) { Console.WriteLine("Equal..!!"); Console.WriteLine("Type of var1 is: {0}", var1.GetTypeCode()); } else { Console.WriteLine("Not equal..!!"); Console.WriteLine("Type of var1 is: {0}", var1.GetTypeCode()); } } } Output: Maximum Value is: 255 Equal..!! Type of var1 is: Byte Reference: https://docs.microsoft.com/en-us/dotnet/api/system.byte.maxvalue?view=netstandard-2.1 Comment More infoAdvertise with us Next Article C# | Byte.MaxValue Field A ankita_saini Follow Improve Article Tags : C# CSharp-Byte-Struct Similar Reads C# | Byte.MinValue Field The MinValue field of Byte Struct is used to represent the minimum possible value of byte data type. The value of this field is constant means that a user cannot change the value of this field. The value of this field is 0. Syntax: public const byte MinValue = 0; Return Value: This field always retu 1 min read Int64.MaxValue Field in C# with Examples The MaxValue field or property of Int64 Struct is used to represent the maximum value of Int64. The value of this field is constant means that the user cannot change the value of this field. The value of this field is 9223372036854775807. Its hexadecimal value is 0x7FFFFFFFFFFFFFFF. Syntax: public c 1 min read Int32.MaxValue Field in C# with Examples The MaxValue field or property of Int32 Struct is used to represent the maximum value of Int32. The value of this field is constant means that the user cannot change the value of this field. The value of this field is 2147483647. Its hexadecimal value is 0x7FFFFFFF. It is used to avoid the OverflowE 1 min read Int16.MaxValue Field in C# with Examples The MaxValue field or property of Int16 Struct is used to represent the maximum value of Int16. The value of this field is constant means that the user cannot change the value of this field. The value of this field is 32767. Its hexadecimal value is 0x7FFF. It is used to avoid the OverflowException 2 min read byte Keyword in C# Keywords are the words in a language that are used for some internal process or represent some predefined actions. byte is a keyword that is used to declare a variable which can store an unsigned value range from 0 to 255. It is an alias of System.Byte. byte keyword occupies 1 byte (8 bits) in the m 2 min read Like