Silverlight, dealing with Async calls
        Posted  
        
            by Billy
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Billy
        
        
        
        Published on 2010-02-21T23:08:51Z
        Indexed on 
            2010/04/09
            2:23 UTC
        
        
        Read the original article
        Hit count: 479
        
Hi there,
I have some code as below:
        foreach (var position in mAllPositions)
        {
                 DoAsyncCall(position);
        }
//I want to execute code here after each Async call has finished
So how can I do the above?
I could do something like:
        while (count < mAllPositions.Count)
        { 
            //Run my code here
        }
and increment count after each Async call is made ... but this doesn't seem like a good way of doing it
Any advice? Is there some design pattern for the above problem as i'm sure it's a common scenario?
© Stack Overflow or respective owner