I want to do the equivalent of this:
byte[] byteArray; enum commands : byte {one, two}; commands content = one; byteArray = (byte*)&content;
You can also just do a simple cast and pass it into the array constructor. It also similar in length to the BitConverter method.
BitConverter
new[] { (byte)mode }