Maybe have a read-only property A and B.  Then create a method to
"SetABRange(A,B)".

---
Patrick Steele ([EMAIL PROTECTED])
Lead Software Architect
Image Process Design



-----Original Message-----
From: Simon Robinson [mailto:[EMAIL PROTECTED]]
Sent: Friday, May 17, 2002 2:01 PM
To: [EMAIL PROTECTED]
Subject: [DOTNET] Setting properties


Hi guys

I have a class with two integer properties - call them A and B.
There is a condition that the value of B should always be greater than A,
otherwise the class won't function correctly. I'd like the error to be
detected and an exception thrown when client code sets the properties,
and I'm trying to figure out if there's any way of doing this that's
consistent with the normal .NET usage guidelines that it should be
acceptable to set
properties in any order.

Any ideas? Is what I want to do possible?

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