ASP webservice serialization of properties
        Posted  
        
            by badra
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by badra
        
        
        
        Published on 2010-05-03T20:59:42Z
        Indexed on 
            2010/05/03
            21:08 UTC
        
        
        Read the original article
        Hit count: 244
        
I got a class like this which gets returned from an ASP webservice:
class Data {
public int A { get; set; }
public int B { get; set; }
public int Sum { get { return A + B; } }
}
When I try to consume the webservice on the client side using Silverlight I only get the properties A and B but I also need Sum. I know I can't return any logic from a webservice, so the expected behavior was it will return the the Sum as a fixed/precalculated property in the client which is what I need.
Any ideas except for redesigning my class?
Thanks ...
© Stack Overflow or respective owner