Silverlight delegates


private void GetMyID()
{

int iMapDocId=0;

//Deleagates in silverlight

WebServiceClient.GetMyIDAsync();
webServiceClient.GetMyIDCompleted += (object s, GetMyIDCompletedEventArgs args) =>

 {
    iMapDocId = args.Result;
 };

}

//In this case we can use local varialbe in completed events and we can use any variable in scope of method.