Skip to main content

Execute Statements in Serial

Moves the child statements out from the Parallel.Invoke() call to convert to serial execution.

#Notes

  • If you use Visual Studio 2008, the Execute Statements in Serial 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 Parallel.

#Availability

Available from the context menus or via shortcuts:

  • when the edit cursor or caret is on a Parallel.Invoke() call.

#Example

Parallel.Invoke(Method1, Method2, Method3);
Parallel.Invoke(AddressOf Method1, AddressOf Method2, AddressOf Method3)

Result:

Method1();
Method2();
Method3();
Method1()
Method2()
Method3()

#Screenshot

rsExecuteStatementsInSerialCSharp

See Also