Ejemplo n.º 1
0
 static void PrintEvents(CalendarEvent[] events)
 {
     foreach (CalendarEvent item in events)
     {
         Console.WriteLine(item.Title + ": " + item.StartTime);
     }
 }
Ejemplo n.º 2
0
        static CalendarEvent[] CombineEvents(CalendarEvent[] event1,
											 CalendarEvent[] event2)
        {
            CalendarEvent[] combinedEvents =
                new CalendarEvent[event1.Length + event2.Length];
            event1.CopyTo(combinedEvents, 0);
            event2.CopyTo(combinedEvents, event1.Length);

            return combinedEvents;
        }
Ejemplo n.º 3
0
 static CalendarEvent[] RemoveFirstEvent(CalendarEvent[] events)
 {
     CalendarEvent[] croppedEvents = new CalendarEvent[events.Length - 1];
     Array.Copy(
         events,
         1,
         croppedEvents,
         0,
         events.Length - 1
         );
     return croppedEvents;
 }