The Introduce Field refactoring allows you to quickly create a new field from a selected constant expression and initialize it with the expression.
Not relevant: ASP.NET, XAML, HTML
To introduce a field
Select an expression.
Press Alt+Insert. From the pop-up menu, select Introduce Field.
Enter a name for the new field or choose one of the suggested names.
- Press Enter to finish or Esc to abort the operation.
To introduce a field you can also navigate on the main menu. Choose JustCode | Refactor | Introduce Field, or just press Ctrl+R, Ctrl+L