none
WCF - Enum RRS feed

  • Question

  • [ServiceContract]
    public interface IService1
    {
        [OperationContract]
        MyEnum Foo();
    }
    
    [DataContract]
    public enum MyEnum
    {
        [EnumMember]
        first,
        [EnumMember]
        Second,
    }

    I'm looking for a way to add a new enum member, only to the service side. Let's say my client is using an old version of the proxy, without the new enum member I want to add. My goal is avoiding a serialization exception, I want my client to be smart enough to handle this situation, ignoring the new value or anything. Any Ideas?

    Monday, February 10, 2014 9:13 AM

Answers

  • Adding a new enum member in service with not cause exception on client side unless service send data to client which has newly added enum member.

    Gaurav Khanna | Microsoft VB.NET MVP | Microsoft Community Contributor

    Monday, February 10, 2014 6:52 PM