Hot answers tagged toolpart
I would do it in the setter. As you are throwing an Exception anyways it is cleaner to not let the user set the value in the first place. If you would do validation only in the ApplyChanges method, other code might have worked with the already wrongly set value. Validate in set, so the user isn't even allowed to write invalid stuff to your variable. Here ...
Only top voted, non community-wiki answers of a minimum length are eligible