嗨,我的结构如下
private struct MessageFormat
{
public byte[] Header; //start of message
public byte Fragmentation; //single packet or not
public byte Encryption; //encrypted message
public byte[] Authentication; //password
public byte[] Flag; //to locate end of auth
public byte[] Data; //info
public byte[] Trailer; //end of message
}
在我填充所有字段后,有没有一种方便的方法可以将整个 MessageFormat 转换为单字节数组 []?