简体   繁体   English

没有使用WCF服务的.NET应用程序的枚举反序列化

[英]Enum deserialization for none .NET application consuming WCF service

So my question is pretty simple- I have a WCF contract with a certain DataContract the includes an enum. 所以我的问题很简单-我有一个WCF合约,带有一个DataContract,其中包含一个枚举。 My goal is: 1. For .Net application to desrialize this DataMember as the suitable enum 2. for none .NET application to desrialize this DataMember as int 我的目标是:1.对于.Net应用程序将该DataMember进行反序列化为合适的枚举2.对于没有.NET应用程序将该DataMember进行反序列化为int

Is there any chance that this is the default behaviour? 是否有可能这是默认行为? If not how do I accomplish this goal? 如果没有,我如何实现这个目标?

Thanks! 谢谢!

在.net中,您可以将int转换为枚举,反之亦然,而将int转换为其他变量的int

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM