[thelist] tip: ASP.NET - Property Declarations
darren
darren at web-bitch.co.uk
Fri Mar 22 04:05:00 CST 2002
On 21 March 2002 at 23:46:04, Chris Blessing <webguy at mail.rit.edu> wrote:
CB> property ToAddress() as String
CB> get
CB> return mstrAddr
CB> end get
CB> set(ByVal strAddr as String)
CB> mstrAddr = strAddr
CB> end set
CB> end property
a slight alternative for your set is:
property ToAddress() as String
get
return mstrAddr
end get
set
mstrAddr = value
end set
end property
value is the values is a keyword that refers to the value being assigned to
the property.
also, if you have only a get or a set in the property you have to mark the
property as readonly or writeonly.
hth,
darren.
More information about the thelist
mailing list