Byte
using System;
/* A byte represents unsigned 8-bit integer*/
public class ByteExample
{
static void Main(String[] args)
{
// You can assign an integer to a byte variable.
byte value = 5;
Console.WriteLine(value);
// The byte type includes a minimum value and maximum value.
Console.WriteLine(byte.MinValue);
Console.WriteLine(byte.MaxValue);
// The byte type has a Type pointer and default value.
Console.WriteLine(typeof(byte));
Console.WriteLine(typeof(Byte)); // Uppercase Byte
Console.WriteLine(default(byte));
Console.ReadLine();
}
}
Output:
5
0
255
System.Byte
System.Byte
0