I have a hierarchy kind of class, it would be very useful for me to set some of its values like child list as public so i can easily export a tree from the item but if the values were to be edited from outside the proper pathways everything would explode. Is it possible to make the variables accessible only from instances of its own class? or at least to have it read-only for anything outside the instance?
Asked
Active
Viewed 585 times
0
-
2Possible duplicate of http://stackoverflow.com/questions/1462673/vb-net-properties-public-get-private-set. Use `Get` and `Private Set`. – musical_coder Nov 14 '13 at 01:02
-
for it to be `accessible only from instances of its own class` they could also just use the backing field and then declare the property `ReadOnly Property FooBar`. – Ňɏssa Pøngjǣrdenlarp Nov 14 '13 at 01:19
-
properties kind of negate the usefulness of lists though – Jake Freelander Nov 14 '13 at 01:30