How about providing a readonly IsValid property? At least then you could
provide some feedback. You could even supply an error message in a
readonly string property. Not ideal, though :(

There's no way to validate the values whilst they're being editied,
because there's no way of knowing when the user has finished changing
them. You can only throw an exception when the changes are committed,
e.g. when serializing them.

G.

-----Original Message-----
From: dotnet discussion [mailto:[EMAIL PROTECTED]] On Behalf Of
Chris Sells
Sent: 17 May 2002 19:35
To: [EMAIL PROTECTED]
Subject: Re: Setting properties


That doesn't work with components in the designer.

Chris Sells
http://www.sellsbrothers.com/

> -----Original Message-----
> From: dotnet discussion [mailto:[EMAIL PROTECTED]] On Behalf
Of
> Sills, Adam
> Sent: Friday, May 17, 2002 11:41 AM
> To: [EMAIL PROTECTED]
> Subject: Re: [DOTNET] Setting properties
>
> Why not just make a setter method and leave your properties readonly.

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

Reply via email to