Execute Statements in Parallel
In This Article
Executes the selected independent statements in parallel.
#Notes
- If you use Visual Studio 2008, the Execute Statements in Parallel refactoring requires Parallel Extensions to be installed and the System.Threading namespace to be added to the project references list.
- This refactoring is the functional opposite of Execute Statements in Serial.
#Availability
Available from the context menus or via shortcuts:
- when several statements are selected.
#Example
│Method1();
Method2();
Method3();
│Method1()
Method2()
Method3()
Result:
Parallel.Invoke(Method1, Method2, Method3);
Parallel.Invoke(AddressOf Method1, AddressOf Method2, AddressOf Method3)
#Screenshot
See Also