我正在开发我的谷歌日历集成应用程序。当我将参加者添加到 EventAttendee 对象时,出现错误“对象未初始化”。请查看下面的代码...
Event Entry = new Event();
Entry.Summary = MeetingName;
Entry.Description = MeetingDetails;
EventDateTime dt_Start = new EventDateTime();
dt_Start.DateTime = meeting.StartTime.ToString("yyyy-MM-ddThh:mm:ss.000Z");
Entry.Start = dt_Start;
EventDateTime dt_End = new EventDateTime();
dt_End.DateTime = meeting.EndTime.ToString("yyyy-MM-ddThh:mm:ss.000Z");
Entry.End = dt_End;
if (invitees != null)
{
foreach (Participant invitee in invitees)
{
String str = invitee.Email;
str = invitee.Name;
Entry.Attendees.Add(new EventAttendee()
{
Email = invitee.Email,
DisplayName = WEB.HttpUtility.HtmlDecode(invitee.Name),
ResponseStatus = "accepted",
Organizer=false,
Resource=false
});
}
}
此时我正在执行“Entry.Attendees.Add(new EventAttendee()”的地方我收到错误消息......