Inside the class, you should use the property. Outside of the class, you should also use the property.
On Wed, Dec 16, 2009 at 9:18 AM, Processor Devil <[email protected]>wrote: > inside the same class use i = me._intID :) > class properties are used to set or get the variable content out of the > current class scope, but yes, either works > > 2009/12/16 hanks2000 <[email protected]> > > oops sorry posted by accident, here's the complete example >> >> Public Property ID() As Integer >> Get >> Return _intID >> End Get >> Set(ByVal value As Integer) >> If Not _intID = value Then >> _intID = value >> End If >> End Set >> End Property >> >> >> Private Sub SomeMethod() >> Dim i As Integer = 0 >> >> 'use this >> i = me._intID >> >> 'or this >> i = me.ID >> End Sub >> >> >> Thanks >> > >
