Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Simultaneously
- Parallel.ForEach(urls, (url) =>
- {
- Response response = MakeWebRequest(url);
- // Do stuff with the response
- });
- // One after another
- foreach (var url in urls)
- {
- Response response = await MakeWebRequestAsync(url);
- // Do stuff with the response
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement