Frans,
Showing how to implement different access levels for the getter and
setter of a property, you suggested:
> Afaik, you can. Define the property get on another
> interface than the set. Then implement the interface directly:
>
> protected int IFoo.Count {{ get return _count;}}
> public int IBar.Count {{ set _count=value;}}
>
> IBar then inherits from IFoo, so when you do not want
> the set, cast to IFoo.
But now, on the metadata level, you have *two* distinct properties, one
read-only and write-only, instead of a single read-write property.
Regards,
Stefan
===================================
This list is hosted by DevelopMentor� http://www.develop.com
NEW! ASP.NET courses you may be interested in:
2 Days of ASP.NET, 29 Sept 2003, in Redmond
http://www.develop.com/courses/2daspdotnet
Guerrilla ASP.NET, 13 Oct 2003, in Boston
http://www.develop.com/courses/gaspdotnet
View archives and manage your subscription(s) at http://discuss.develop.com