As I am working on one Windows service project, I am finding trouble to integrate below functionality.
-
I need to
call 5 different web services on 5 different threadin one call (in single method). -
I must
have to wait for all 5 service's responseand then I have to perform next task.
Question: How would I wait for all service's response which is called by each different thread? and then I perform my next task moving further.
Thanks in advance.
If you are using .NET 4.0, you can use the Task Parallel Library.
Start each web service call with a new Task and then call Task.WaitAll passing arraying of tasks created.