diff --git a/src/ReflectionUtils/ReflectionUtils.cs b/src/ReflectionUtils/ReflectionUtils.cs index 6b93867..e79e7ae 100644 --- a/src/ReflectionUtils/ReflectionUtils.cs +++ b/src/ReflectionUtils/ReflectionUtils.cs @@ -202,6 +202,15 @@ public static IEnumerable GetProperties(Type type) #endif } + public static PropertyInfo GetProperty(Type type, string name) + { +#if REFLECTION_UTILS_TYPEINFO + return type.GetTypeInfo().GetDeclaredProperty(name); +#else + return type.GetProperty(name); +#endif + } + public static IEnumerable GetFields(Type type) { #if REFLECTION_UTILS_TYPEINFO