Refactoring - Introducing Fields

From RAD Studio
Jump to: navigation, search

Go Up to Refactoring Applications Index

This topic explains how to use the "Introduce field" operation.

To introduce a field:

  1. Select expression in the Code Editor.
  2. On the main menu, choose Refactoring > Introduce Field.
    Tip: Alternatively, you can choose Refactoring > Introduce Field on the context menu.
  3. In the resulting dialog, specify the following:
    • Name: Enter the name of the new field.
    • Visibility: Using the list box, choose the visibility for the new field from public, protected, private, internal, or internal protected.
    • Initialize: Choose where to initialize the new field. Using the list box, choose from Current method, Class constructor(s), or Field declaration.
  4. If applicable, check the Static and Replace all occurrences fields.
  5. Click OK to complete the refactoring.

See Also

Personal tools
Newest Version: XE
In other languages