public override void Write(BinaryWriter writer, object obj) { writer.Write((obj as OnHeartbeat).DateTime.Ticks); } }