Given:
- An asmx web service.
- A 3rd party dll that contains a useful enum.
Question:
How can I expose this enum through my
web service without having to repeat
myself and re-type the enum’s members
in my webservice’s public class?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can create a method which either takes or returns a value with their enum in it. The namespace on the enum will change to your service namespace when they generate the proxy class, but you’ll have the values they input on your end. This shouldn’t be a problem though as long as they aren’t trying to use the same enum in your service and the third party.