Quantcast
Viewing all articles
Browse latest Browse all 764

TimeZoneInfo Property Will not Serialize

I am getting an error when my business object is being returned from the server to Silverlight:

Type 'System.TimeZoneInfo' with data contract name 'TimeZoneInfo:http://schemas.datacontract.org/2004/07/System' is not expected. Consider using a DataContractResolver or add any types not known statically to the list of known types - for example, by using the KnownTypeAttribute attribute or by adding them to the list of known types passed to DataContractSerializer.

I have a property that is of type TimeZoneInfo which is needed for a Telerik control (it is in the implementation of an interface):

         publicstaticreadonlyPropertyInfo<TimeZoneInfo> TimeZoneProperty = RegisterProperty<TimeZoneInfo>(c => c.TimeZone);

        publicTimeZoneInfo TimeZone

        {

            get { return GetProperty(TimeZoneProperty); }

            set { SetProperty(TimeZoneProperty, value); }

        }

I don't really know how to resolve this issue.  Can someome offer some help? 

Todd


Viewing all articles
Browse latest Browse all 764

Trending Articles