1 由于枚举类型本身就是可以序列化的,所以你不需要增加DataContractAttribute到枚举类型定义中,就可以直接将枚举类型应用到WCF的服务契约中。
一般
You can use simple enumerations when you do not need to customize the enumeration's data contract name and namespace and the enumeration member values.
2
本文介绍如何在Windows通信基础(WCF)服务契约中使用枚举类型,并指出通常情况下无需为枚举类型添加DataContractAttribute注解即可实现序列化。
1 由于枚举类型本身就是可以序列化的,所以你不需要增加DataContractAttribute到枚举类型定义中,就可以直接将枚举类型应用到WCF的服务契约中。
一般
You can use simple enumerations when you do not need to customize the enumeration's data contract name and namespace and the enumeration member values.
2

被折叠的 条评论
为什么被折叠?