Namespace for [DataContract]

前端 未结 6 2178
一个人的身影
一个人的身影 2020-11-30 18:39

I can\'t find the namespace to use for [DataContract] and [DataMember] elements. According to what I\'ve found, it seems that adding the following

6条回答
  •  夕颜
    夕颜 (楼主)
    2020-11-30 19:12

    [DataContract] and [DataMember] attribute are found in System.ServiceModel namespace which is in System.ServiceModel.dll .

    System.ServiceModel uses the System and System.Runtime.Serialization namespaces to serialize the datamembers.

提交回复
热议问题