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.
有没有办法找出,如果在客户端反序列化期间或在服务器反序列化期间调用构造函数?我谈论了共享项目中标有 DataContract 属性的类的构造函数。
谢谢你汤姆
解决了。Environment.GetEnvironmentVariable("propertyName")。PropertyName 应该放在客户端和服务器的launchSettings.json 中。