📅  最后修改于: 2022-03-11 15:02:18.385000             🧑  作者: Mango
public class NameOf
{
public static String nameof(Expression> name)
{
MemberExpression expressionBody = (MemberExpression)name.Body;
return expressionBody.Member.Name;
}
}