Applying Best Practices to New CalendarItem Instances with the Proxy Classes

Let’s put together all of the knowledge and best practices from this chapter so far and create new calendar items with the proxy classes. Example 8-12 creates a new appointment for February 26, 2007 at 8 A.M., but in a time zone you may not be familiar with: "Nepal Standard Time," which is defined as UTC+05:45. Example 8-12 takes advantage of the TimeSpanToXSDuration method defined in Example 8-10. Example 8-12 also follows the Exchange Web Services team best practice recommendation of using date/time strings without UTC offsets when a MeetingTimeZone has been provided. The code in Example 8-12 accomplishes this by using a DateTimeKind value of Unspecified with all of ...

Get Inside Microsoft® Exchange Server 2007 Web Services now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.