> Is there a way to get round this (without creating a set accessor in
the
> interface/NormalUser object and throwing an exception in it's method)
-
> properties in reality are functions (right?) so I should be able to do
> this
> from the CLR's point of view.

I haven't tried this recently, but I believe you totally can do this
from the CLR's point of view. Unfortunately, the C# compiler won't let
you emit the particular IL you need. So either switch to a language that
does support this construct, throw the exception like you mentioned, or
define another method on the class that lets you set the value of the
property.

You can read messages from the Advanced DOTNET archive, unsubscribe from Advanced 
DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

Reply via email to