📅  最后修改于: 2022-03-11 14:48:47.453000             🧑  作者: Mango
// If property is something like an int or double and you want an object,
// you need to manually convert it to an object via another expression.
var parameter = Expression.Parameter(typeof(T));
var body = Expression.Property(parameter, propertyName);
var converted = Expression.Convert(body, typeof(object));
return Expression.Lambda>(converted, parameter);