有使用SL4的WCF服务引用的么?System.ComponentModel.AsyncCompletedEventArgs
如果WCF服务中返回 int 或 bool(不需要使用ref参数),
如
[OperationContract] public int UpdateXXXX(string p1 , string p2) { return 1; }
public event System.EventHandler<UpdateXXXXCompletedEventArgs> UpdateXXXXCompleted; public partial class UpdateXXXXCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { private object[] results; public UpdateXXXXCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : base(exception, cancelled, userState) { this.results = results; } public int Result { get { base.RaiseExceptionIfNecessary(); return ((int)(this.results[0])); } } }
public event System.EventHandler<System.ComponentModel.AsyncCompletedEventArgs> UpdateXXXCompleted;