Hi everyone,
A web service method is declared by
[WebMethod]
public void MyMethod() {
}
However, this doesn't work with get/set property? How would one go about
defining a get/set property in a web service?
ex.
[WebMethod]
public string custFirstName
{
get
{
return FirstName;
}
}
Error: Attribute 'WebMethod' is not valid on this declaration type. It is
valid on 'method' declarations only.
Thank you
Maz.
Brock Allen - 29 Mar 2005 22:09 GMT
WebServices doesn't support properties. This would be a bad precedent as
it skews people's thinking that web services are about objects (and properties)
when they're not.
-Brock
DevelopMentor
http://staff.develop.com/ballen
> Hi everyone,
>
[quoted text clipped - 19 lines]
> Thank you
> Maz.