Validate property based on another property

Topics: Validation Application Block
May 1, 2009 at 1:35 PM
I have a class that has the following properties

bool HasFacility
int NoTimes

What I need to do is validate NoTimes baised on the value of HasFacility

If HasFacility is False then NoTimes must be 0
If HasFacility is True then NoTimes must be greater than 0

Any idea how I can achive this?

May 4, 2009 at 2:13 AM
Refer to this FAQ item -

Sarah Urmeneta
Global Technology & Solutions
Avanade, Inc.