Roy <Ro*@discussions.microsoft.comwrote:
If I define a property as
int age
{
get;
set;
}
Is there a way to add different access modifiers to the accessors when
implement?
If you've put that in the interface, they're public and *have* to be
public.
If you just mean the normal declaration of a property, you can indeed
specify them differently - but only in 2.0.
For example:
public int Age
{
get { return age; }
private set { age = value; }
}
--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet Blog:
http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too