具体代码typedef union{ViUInt32 i32;struct{ViUInt32 Label :8;ViUInt32 Data :24;}fld}Arinc
2 回答
慕尼黑5688855
TA贡献1848条经验 获得超2个赞
using System.Runtime.InteropServices; [StructLayout(LayoutKind.Explicit, Size = 4)] struct Arinc { [FieldOffset(0)] public uint i32; [FieldOffset(0)] public byte Label; [FieldOffset(1)] public uint Data; } |
慕的地6264312
TA贡献1817条经验 获得超6个赞
[StructLayout(LayoutKind.Explicit, Size=2)]struct TokenValue{[FieldOffset(0)][MarshalAs(UnmanagedType.U1)]public byte _cval;[FieldOffset(1)][MarshalAs(UnmanagedType.U1)] public byte _ival;[FieldOffset(0)]public ushort flags;}
添加回答
举报
0/150
提交
取消