>>You can also use linQ to see if the property exists and to return the properties value.
>>
>>if( MyClass.GetType().GetProperty (propName) != null)
>>{
>> object propValue = MyClass.GetType().GetProperty(propName).GetValue(MyClass, new object[]{});
>>}
>>
>
>Where does Linq come into that?
>Oh - and before Gregory beats me to it - assigning a value to GetProperty() in the if clause would avoid having to re-evaluate if it's not null.....
You're way too fast
Gregory