Hi,
Please see knowledge base article:
Basically you can only do this for complexTypes, simpleTypes require you to use the IsValid... properties.
I have added this to the requested features for review, as I think this is a valid concept for .Net languages. Although I guess in C++ we could also create a wrapper class to do this (as that is what .Net does for you).