Click here to Skip to main content
15,890,382 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Please, someone can help me with the question in this code

C#
public void GetLastSeenCompleted(string did)
       {
           houdiniMMSService.GetLastSeenCompleted += new EventHandler<HoudiniMMSService.GetLastSeenCompletedEventArgs>(HoudiniMMSServiceGetLastSeenCompleted);
           houdiniMMSService.GetLastSeenAsync(did);

       }


       private void HoudiniMMSServiceGetLastSeenCompleted(object sender, HoudiniMMSService.GetLastSeenCompletedEventArgs e)
       {
           try
           {
               //I want to stop executing my program until this message is displayed
               // How can I do this?

               MessageBox.Show(Convert.ToString(e.Result));
           }
           catch(Exception ex)
           {
               MessageBox.Show("Unable to get last seen value from server: " + ex.ToString());
           }
       }
Posted
Comments
bowlturner 2-Dec-13 14:50pm    
not exactly sure what you are asking. but a pure shot in the dark, if you want to stop executing for something, don't use async.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900