Closed JohanLarsson closed 5 years ago
internal static class PropertyInfoExt { internal static Func<TSource, TValue> CreateGetter<TSource, TValue>(this PropertyInfo property) { var parameter = Expression.Parameter(typeof(TSource)); return Expression.Lambda<Func<TSource, TValue>>(Expression.Property(parameter, property), parameter) .Compile(); } }
Done.