none
The problem of GetUserAvailability function in exchange RRS feed

  • Question

  • GetUserAvailabilityResults freeBusyResults = service.GetUserAvailability(attendees, new TimeWindow(DateTime.Now, DateTime.Now.AddDays(1)), AvailabilityData.FreeBusy,myOptions); int i = 0; foreach (AttendeeAvailability availability in freeBusyResults.AttendeesAvailability) { Console.WriteLine("Availability information for:{0}", attendees[i].SmtpAddress); foreach (CalendarEvent calendarItem in availability.CalendarEvents) { Console.WriteLine(calendarItem.Details.Subject.ToString()); Console.WriteLine("Free/busy status: " + calendarItem.FreeBusyStatus.ToString()); Console.WriteLine("Start time: " + calendarItem.StartTime.ToString()); Console.WriteLine("End time: " + calendarItem.EndTime.ToString()); Console.WriteLine(); }

    Why Console.WriteLine(calendarItem.Details.Subject.ToString()); always displays

    "Object reference not set to an instance of an object." but others are correct?

    Please help me.



    • Edited by George Hua Monday, June 16, 2014 3:34 PM change Chinese to English
    • Moved by George Hua Monday, June 16, 2014 3:35 PM Exchange related
    Monday, June 16, 2014 2:50 AM

All replies