private void FindPiCallback(IAsyncResult state) { FindPiDelegate del = (FindPiDelegate)state.AsyncState; double retVal = del.EndInvoke(state); if (FindPiComplete != null) { FindPiComplete(retVal); } }
public void BeginFindPi(int decimalPlaces) { FindPiDelegate del = new FindPiDelegate(DoPICalc); del.BeginInvoke(decimalPlaces, new AsyncCallback(this.FindPiCallback), del); }