E
Elliot Rodriguez
Given the following:
Public Class Foo
Private m_strBar as string
Public Property BarString as String
Get
BarString = m_strBar
End Get
Set(ByVal value as string)
m_strBar = value
End Set
End Property
Public Sub DoSomething
End Sub
End Class
I need to access information related to the BarString property, and access
it within the DoSomething sub.
My question is - is there any reason why I should, or should not, access the
local variable as opposed to getting the property value using Me.BarString?
In debugging it seems the compiler has to retrieve the value anyway, and
accessing the local variable is more "direct", so I assume does not have the
same performance implications that using Me.BarString does.
Thanks!
Public Class Foo
Private m_strBar as string
Public Property BarString as String
Get
BarString = m_strBar
End Get
Set(ByVal value as string)
m_strBar = value
End Set
End Property
Public Sub DoSomething
End Sub
End Class
I need to access information related to the BarString property, and access
it within the DoSomething sub.
My question is - is there any reason why I should, or should not, access the
local variable as opposed to getting the property value using Me.BarString?
In debugging it seems the compiler has to retrieve the value anyway, and
accessing the local variable is more "direct", so I assume does not have the
same performance implications that using Me.BarString does.
Thanks!