none
How can I add DataContract attribute RRS feed

  • Question

  • How can I see DataContract and DataMember Attribute in Intellisense?  I can see ServiceContract, OperationContract, MessageContract, FaultContract but not these two. 

    I try to compile class with DataContract but encounter error!

    Friday, November 3, 2006 12:20 PM

Answers

  • Make sure you add a reference to the System.Runtime.Serialization.dll assembly from WCF and add a "using System.Runtime.Serialization;" statement!
    Friday, November 3, 2006 1:08 PM
    Moderator

All replies

  • Make sure you add a reference to the System.Runtime.Serialization.dll assembly from WCF and add a "using System.Runtime.Serialization;" statement!
    Friday, November 3, 2006 1:08 PM
    Moderator
  • I marked Tomas' post as the answer. You can also look at the DataContract samples under Contracts in the WCF samples included with the Windows SDK.
    Friday, November 3, 2006 4:42 PM
  • I had already thought of that and it didn't work. The error message indicates that you may not have a reference specified.
    Wednesday, August 12, 2009 10:49 PM