Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想在不破坏现有客户端的情况下向 WCF DataContract 添加更多 DataMembers。这就是为什么我将它们添加为可为空的 DateTime 对象,但是客户端因“可为空的对象必须具有值”而失败。
我明白这与DateTime? something = (DateTime?) null;. 我怎样才能在不改变所有现有客户的情况下完成这项工作?
DateTime? something = (DateTime?) null;
[DataMember(IsRequired = false)]