好的,我确定这一定非常容易,但我找不到有关此事的信息。
另外,这是我第一次使用 WCF,所以如果我对事物的理解有点慢,请放轻松。
假设我有这门课
[DataContract]
public class whatever {
[DataMember]
public string whateverName;
[DataMember]
public string whateverId;
}
这将序列化为:
<whatever>
<whateverName></whateverName>
<whateverId></whateverId>
</whatever>
如何更改它以进行以下序列化?
<whatever whateverName="" whateverId="" />