encaspulating a C# class in a [WebMethod]

AaronRiley

New Member
of course you can write <BR><BR>using System.Web.Services;<BR>[WebMethod]<BR>public int myService1()<BR>{<BR> ...do something<BR>}<BR><BR>[WebMethod]<BR>public int myService2()<BR>{<BR> ...soo some other service.<BR>}<BR><BR><BR>Why can't I just create a class for multiple [WebMethod]s like this...<BR><BR>using System.Web.Services;<BR>[WebMethod]<BR>public class myServices()<BR>{<BR> public int myService1()<BR> {<BR> ...some code<BR> }<BR> <BR> public int myService2()<BR> {<BR> ...some more code<BR> }<BR>}<BR><BR>Am I just failing to inherit the webservice correclty or what?<BR>If anyone could help, i'd appreciate it. THANX! =)
 
Top