A
A Traveler
Hello,
I am wondering if this is possible: Code myself a nice class, say MyClass.
Give it some property, say MyProp which has Public Readonly but Protected
Write-ability. So it would be, in effect, something like this:
Public Property MyProp() As Whatever
Public Get
Return pMyProp
End Get
Protected Set(Value As Whatever)
pMyProp = Value
End Set
End Property
I know this syntax is not valid, because ive tried it. Is there any way that
this CAN be coded though? Of course it could be worked around by making the
property Public ReadOnly, and then making a Protected Sub SetMyProp(Value As
Whatever). Im just more curious though, if there is anyway to change the
accessiblity scope on the Get and Set portions of a property.
- Arthur Dent.
I am wondering if this is possible: Code myself a nice class, say MyClass.
Give it some property, say MyProp which has Public Readonly but Protected
Write-ability. So it would be, in effect, something like this:
Public Property MyProp() As Whatever
Public Get
Return pMyProp
End Get
Protected Set(Value As Whatever)
pMyProp = Value
End Set
End Property
I know this syntax is not valid, because ive tried it. Is there any way that
this CAN be coded though? Of course it could be worked around by making the
property Public ReadOnly, and then making a Protected Sub SetMyProp(Value As
Whatever). Im just more curious though, if there is anyway to change the
accessiblity scope on the Get and Set portions of a property.
- Arthur Dent.