放入R
时,二进制向量中产生的重写问题错误public static string GetCalendarAsString(string subject, DateTime start, DateTime end,
string location, string timeZoneName)
{
var calendar = new iCalendar();
var timeZone = TimeZoneInfo.FindSystemTimeZoneById(timeZoneName);
calendar.AddTimeZone(iCalTimeZone.FromSystemTimeZone(timeZone));
var evt = new Event
{
Start = new iCalDateTime(start),
End = new iCalDateTime(end),
Location = location,
Summary = subject,
IsAllDay = false
};
calendar.Events.Add(evt);
var serializer = new iCalendarSerializer();
return serializer.SerializeToString(calendar);
}