DataContract missing a reference?

An easy way to serialize objects in Silverlight is to use DataContract and DataMember attributes to decorate the objects/properties you want to serialize. One little gotcha is that by default you can add the System.Runtime.Serializable namespace fine but DataContract doesn’t show as useable. You have to add a reference to the System.Runtime.Serializable library to get those features.

3 thoughts on “DataContract missing a reference?

  1. Carlos August 4, 2011 / 5:55 pm

    Thanks!

    I was struggling with this problem!

  2. Kelvin November 9, 2011 / 10:33 am

    Thanks

  3. Wilson (Brasil) June 3, 2012 / 3:03 am

    Thansks man
    Obrigado amigo

Leave a comment