S
SteveS
What's the difference in using the private variable as opposed to the actual
property in a class module? Which is better or more efficient? (
LoginObject.Save (_loginName) or LoginObject.Save (me.LoginName)
FOR EXAMPLE:
Class MyClass
Private _loginName As String
Public Property LoginName() As String
Get
Return _loginName
End Get
Set(ByVal Value As String)
_loginName = Value.ToLower()
End Set
End Property
public sub Save()
dim LoginObject as new Data.LoginObject
'****** what is the difference in these 2 lines? *******
LoginObject.Save (_loginName)
LoginObject.Save (me.LoginName)
'******************************************
end function
End Class
Thank You,
SteveS
property in a class module? Which is better or more efficient? (
LoginObject.Save (_loginName) or LoginObject.Save (me.LoginName)
FOR EXAMPLE:
Class MyClass
Private _loginName As String
Public Property LoginName() As String
Get
Return _loginName
End Get
Set(ByVal Value As String)
_loginName = Value.ToLower()
End Set
End Property
public sub Save()
dim LoginObject as new Data.LoginObject
'****** what is the difference in these 2 lines? *******
LoginObject.Save (_loginName)
LoginObject.Save (me.LoginName)
'******************************************
end function
End Class
Thank You,
SteveS