To introduce a new variable from an existing expression, select it and press Ctrl+Alt+V, then specify the name and type.
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 |
---|---|
|
|