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