嗨,我有一个名为 GetString 的 WCF 服务方法,我将其命名为 Windows Phone 应用程序,为此我正在使用无法调用的 EventHandler。这是我的示例代码,
private void Button_Click_1(object sender, RoutedEventArgs e)
{
MobileService1.Service1Client x = new MobileService1.Service1Client();
x.GetStringAsync();
x.GetStringCompleted += new EventHandler<MobileService1.GetStringCompletedEventArgs>(x_GetStringCompleted);
}
private void x_GetStringCompleted(object sender, MobileService1.GetStringCompletedEventArgs e)
{
MessageBox.Show(e.Result);
}
这个x_GetStringCompleted没有被调用,请帮助人们......