tags:

views:

226

answers:

2

This is my starting point link text to expose an enum which the Client can consume; it is not part of method signature. My code compiles but I am unable to view it in wsdl and unable to use it in my C# windows form application test project. Is the test code in the link missing something?

+2  A: 

Use the KnownType attribute on an existing data contract.

[KnownType(typeof(YourEnum))]
[DataContract]
public class FooContract { }
Andrew Hare
A: 

The link, link text,that I was following gave this code

[ServiceKnownType("GetKnownTypes", typeof(EnumHelper))]

If I changed it to this

[ServiceKnownType("GetKnownTypes", typeof(MyEnumName))]

My consuming client is able to view the enum type. The ? is why doesnt the helper static class assist in exposing the enum. I even came across this link text