Child pages
  • Introduce Variable
Skip to end of metadata
Go to start of metadata

To introduce a new variable from an existing expression, select it and press Ctrl+Alt+V, then specify the name and type.

Icon

Alternatively you can open the Refactor menu and select Introduce Variable


Icon

Some very cool neat stuff below (smile)

When you select an expression inside of a for statement, then, if it matches successfully against a pattern in generator or enumerator of that statement, the selected expression is extracted into a separate enumerator within the same for statement.

Before

After

Icon

Pay attention to the result variable that is created via the use of this refactoring.

  • No labels