I am wondering if there is any way to declare a byte variable in a short way like floats or doubles? I mean like 5f and 5d. Sure I could write
5f
5d
As per MSDN you can declare a byte using a decimal, hexadecimal or binary literal.
// decimal literal byte x = 5; // hex decimal literal byte x = 0xC5; // binary literal byte x = 0b0000_0101;