using System; using System.Runtime.InteropServices; namespace Lskj.AttachStart.Service { [StructLayout(LayoutKind.Sequential, Pack = 1)] public struct S2C2S_Heart { public static uint ID; public MsgHeader header; public S2C2S_Heart(bool autoSet) { this.header = new MsgHeader(); this.header.dwType = ID; this.header.dwLen = (uint)Marshal.SizeOf(this); } static S2C2S_Heart() { ID = 65542; } } }