扫一扫
分享文章到微信
扫一扫
关注官方公众号
至顶头条
void DoSomethingTest() { localhost.Service service = new WindowsApp.localhost.Service(); service.HelloWorldCompleted += new WindowsApp.localhost.HelloWorldCompletedEventHandler(service_HelloWorldCompleted); // do Asyn calling here service.HelloWorldAsync(); } void service_HelloWorldCompleted(object sender, WindowsApp.localhost.HelloWorldCompletedEventArgs e) { if (e.Error == null) { MessageBox.Show(e.Result); } else { MessageBox.Show(e.Error.Message); } } |
[WebService(Namespace = "http://tempuri.org/")] [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)] public class Service : System.Web.Services.WebService { public Service () {} [WebMethod] public string HelloWorld() { return "Hello World"; } } |
如果您非常迫切的想了解IT领域最新产品与技术信息,那么订阅至顶网技术邮件将是您的最佳途径之一。