Using the class builder, I have created an object having 2 properties named cSourcefile and cSourceDestination and one method named Download.
When I clicked on that object from the project, I see that a bunch of code was added. How can I avoid Visual Basic to auto add this bunch of references? I mean, I only added 2 properties and one method and Visual Basic converted that to about 25 lines. Here is the code.
'local variable(s) to hold property value(s)
Private mvarcSourceFile As String 'local copy
Private mvarcDestinationFile As String 'local copy
Public Function Download() As Integer
End Function
Public Property Let cDestinationFile(ByVal vData As String)
'used when assigning a value to the property, on the left side of an assignment.
'Syntax: X.cDestinationFile = 5
mvarcDestinationFile = vData
End Property
Public Property Get cDestinationFile() As String
'used when retrieving value of a property, on the right side of an assignment.
'Syntax: Debug.Print X.cDestinationFile
cDestinationFile = mvarcDestinationFile
End Property
Public Property Let cSourceFile(ByVal vData As String)
'used when assigning a value to the property, on the left side of an assignment.
'Syntax: X.cSourceFile = 5
mvarcSourceFile = vData
End Property
Public Property Get cSourceFile() As String
'used when retrieving value of a property, on the right side of an assignment.
'Syntax: Debug.Print X.cSourceFile
cSourceFile = mvarcSourceFile
End Property