R
Ren
Hi All,
I'm still rather new at vb.net and would like to know the proper way to access
private varibables in a class. Do I access the variable directly or do I use
the public property?
public class MyClass
private _variableName as integer
public property VariableName as integer
get
return _variableName
end get
set(byVal Value as integer)
_variableName = value
end set
end property
public sub DoSomething ()
' do I use _variableName or
' do I use VariableName"
end sub
end class
Thanks
I'm still rather new at vb.net and would like to know the proper way to access
private varibables in a class. Do I access the variable directly or do I use
the public property?
public class MyClass
private _variableName as integer
public property VariableName as integer
get
return _variableName
end get
set(byVal Value as integer)
_variableName = value
end set
end property
public sub DoSomething ()
' do I use _variableName or
' do I use VariableName"
end sub
end class
Thanks