Convert Field to Property |
Top Previous Next |
C# VB.NET VB6 VBA The Convert Field to Property feature allows you to easily convert a field (or selected group of fields) of a class such as: [C#]
public int Count; [VB.NET / VB / VBA]
Public Count As Integer into a property such as: [C#]
private int m_count;
public int Count { get { return m_count; } set { m_count = value; } } [VB.NET]
Private m_count As Integer
Public Property Count() As Integer
Get Return m_count End Get
Set(ByVal value As Integer) m_count = Value End Set
End Property [VB / VBA]
Private m_count As Integer
Public Property Get Count() As Integer End Property Once you have put the cursor on the line with the field declaration (or selected the several lines with field declarations), MZ-Tools offers the following ways to convert it to a property:
Then, the line under the cursor will be parsed and the proper values will be filled in the New Method / Property Assistant window. When you click the Insert button, the field declaration is converted to a property. Remarks:
See Also: |