const byte MAX_VALUE = 255;
byte[] data = new byte[5] { 0x01, 0x02, 0x03, 0x04, 0x05 }; const byte DATA_LENGTH = 5; for (int i = 0; i < DATA_LENGTH; i++) { Console.WriteLine(data[i]); }In this example, the constant byte DATA_LENGTH is used to define the size of the byte array data. The loop iterates over the array and prints out each value. The constant byte is part of the System.Byte data type and is included in the core .NET library.