Groups | Blog | Home
all groups > vb.net upgrade > february 2004 >

vb.net upgrade : Public and Friend Properties


FilthyZombie
2/5/2004 4:51:06 AM
In our VB6 application we have a lot (>300) of (large) classes where various properties are marked as Public Get and Friend Let/Set. This is so that the DLL can load the objects and set the properties but they become readonly to the outside world.

filthyZombie
2/5/2004 7:06:05 AM
We have also come up with an alternative - add a Friend Property Set Writeable() As Boolean. This would enable us to test within the myriad properties whether updates are allowed. The "Parent" can then enable,make and then disable update, whilst since it would be a friend, the outside world would not be able to update the class.

hirf-spam-me-here NO[at]SPAM gmx.at
2/5/2004 2:24:24 PM
* =?Utf-8?B?RmlsdGh5Wm9tYmll?= <anonymous@discussions.microsoft.com> scripsit:
[quoted text, click to view]

Currently, 'Property Get' and 'Property Set' must have the same
modifier. I would put the 'Friend' part into a 'Friend' method, the
public part into a 'Public' property.

--
Herfried K. Wagner [MVP]
AddThis Social Bookmark Button