How to check if EWS Contact.Birthday property exists
c#, exchangewebservices
Solution
You can check for property existence using `TryGetProperty()` like this:
DateTime birthday;
contact.TryGetProperty(ContactSchema.Birthday, out birthday);
Problem
Within my C# EWS application, I am pulling a specific contact and grabbing the properties for them. I am hung up on contact.birthday. I'll probably have the same issue with other date time fields so this would assist in killing two or more birds with one stone :P http://msdn.microsoft.com/en-us/library/microsoft.exchange.webservices.data.contact.birthday(v=exchg.80) I know the property isn't set in my test contact, but everytime it goes to retreive these prop's I get the following message "This property was requested, but it wasn't returned by the server." I know the value isn't set, so how do i check for null or prop not set or something like that. I have tried several different methods without any luck. I am starting to loose my hair over this one. Any help or suggestions would be great.