Exemple #1
0
        public override CalendarPrototype Clone()
        {
            var copy = (CalendarEvent)base.Clone();

            // this allows us have another list, but same attendees there
            var copiedAttendees = (Attendee[])Attendees.Clone();

            copy.Attendees = copiedAttendees;

            // we also would like to copy priority
            copy.Priority = (Priority)Priority.Clone();

            return(copy);
        }
Exemple #2
0
        public override CalendarProptotype Clone()
        {
            var copy = (CalendarEvent)base.Clone();

            // це дозволить нам мати список із посиланнями на тих же відвідувачів
            var copiedAttendees = (Attendee[])Attendees.Clone();

            copy.Attendees = copiedAttendees;

            //copy.Attendees = copiedAttendees;
            // Також скопіюємо приоритет
            //. ....
            copy.Priority = Priority.Clone();

            return(copy);
        }