Nairooz Nilafdeen's Blog
Tuesday, June 15, 2010
Exposing Enum Types From WCF
There are many cases where you would want to expose enum types from a WCF service, so how do you do this?
Simply create a data contract and mark the values with the EnumMember attribute and thats it
[DataContract]
public enum MyEnumName
{
[EnumMember]
CSV,
[EnumMember]
XML = 2
}
0 comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment