static PropertyInfo FindProperty(Type wrapperType, Type objectType, string propertyName)
{
PropertyInfo info;
if (wrapperType != null) {
info = wrapperType.GetProperty (propertyName, flags);
if (info != null)
return info;
}
info = objectType.GetProperty (propertyName, flags);
if (info != null)
return info;
throw new ArgumentException ("Invalid property name " + objectType.Name + "." + propertyName);
}