I want to do the equivalent of this:
byte[] byteArray; enum commands : byte {one, two}; commands content = one; byteArray = (byte*)&content;
You can use the BitConverter.GetBytes method to do this.