namespace LSServerService { using System; using System.Runtime.InteropServices; [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; } } }