B
Bob Weiner
Is it possible to create a property and specify different access modifiers
for the get and set methods? From the property definition it appears that
you can define attributes but not access modifiers. I have never used
attributes so I don't know if they are useful for this purpose.
What I want to do is to create an 'Entry' class that will be used by two
other classes. One class will create the 'Entry', assign limits, a default
value ... The other class is the user interface. This class should have
permission to read all the properties but only set the value.
I believe that this can be accomplished with a protected constructor and
read only properties but I am curious if there is a way to control this on a
higher level. I have ran into similar problems in the past and would like
to hear how the more experienced tackle this.
thanks,
bob
for the get and set methods? From the property definition it appears that
you can define attributes but not access modifiers. I have never used
attributes so I don't know if they are useful for this purpose.
What I want to do is to create an 'Entry' class that will be used by two
other classes. One class will create the 'Entry', assign limits, a default
value ... The other class is the user interface. This class should have
permission to read all the properties but only set the value.
I believe that this can be accomplished with a protected constructor and
read only properties but I am curious if there is a way to control this on a
higher level. I have ran into similar problems in the past and would like
to hear how the more experienced tackle this.
thanks,
bob