how to convert a value type to byte[] in C#?

前端 未结 5 1940
南旧
南旧 2020-12-11 16:36

I want to do the equivalent of this:

byte[] byteArray;
enum commands : byte {one, two};
commands content = one;
byteArray = (byte*)&content;
5条回答
提交回复
热议问题