Convert Public Variable To Property

Top  Previous  Next

The Convert Public Variable To Property feature allows you to convert easily a public member variable such as:

 

Public Count As Long

to a pair of Get / Let properties such as:

 

Private m_lCount As Long

 
Public Property Get Count() As Long

Count = m_lCount

End Property

 
Public Property Let Count(ByVal lCount As Long) As Long

m_lCount = lCount

End Property

Once the cursor is in the line with the public variable, MZ-Tools offers the following ways to convert it to a property:

  • The Tools | MZ-Tools | Other Utilities | Convert Public Variable To Property... menu.
  • The MZ-Tools | Convert Public Variable To Property... context menu of a code window.
  • The Other Utilities | Convert Public Variable To Property... menu on the MZ-Tools toolbar.
  • The shortcut customized in the Options window, Shortcuts tab.

Then, the line under the cursor will be parsed and the proper values will be filled in the Add Procedure dialog. When you click the Add button, the member variable is converted to a property.

Remarks:

  • You can customize the nomenclature preferences for member variables and property parameters in the Options window, Nomenclature tab.

See Also:

Add Procedure

Nomenclature Customization