具體代碼typedef union{ViUInt32 i32;struct{ViUInt32 Label :8;ViUInt32 Data :24;}fld}Arinc
2 回答

慕尼黑5688855
TA貢獻(xiàn)1848條經(jīng)驗(yàn) 獲得超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貢獻(xiàn)1817條經(jīng)驗(yàn) 獲得超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;}
添加回答
舉報(bào)
0/150
提交
取消