web services - c# webservice class response -


i have class:

    public class loginresponse     {         public string sessionid { get; private set; }         public datetime? activeto { get; private set; }          public loginresponse()         {         }          public loginresponse(string sessionid, datetime? activeto)         {             this.sessionid = sessionid;             this.activeto = activeto;         }     } 

and want return class webservice response:

[webmethod]         public loginresponse login(string login, string password)         {             return new loginresponse("a", null);         } 

the class loginresponse in other dll. must do, because got error??

the errors told must using attribute webmethodattribute or change root type using xmlrootattribute, because loginresponse refers method or type

i have solution:

i must change function name login :) it's name servicelogin , works fine :)

regards


Comments

Popular posts from this blog

c++ - How do I get a multi line tooltip in MFC -

asp.net - In javascript how to find the height and width -

c# - DataTable to EnumerableRowCollection -