📜  public class NameOf { public static String nameof<T> (表达<Func<T> &gt; name) { MemberExpression expressionBody = (MemberExpression)name.Body;返回表达式Body.Member.Name; } } - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:02:18.385000             🧑  作者: Mango

代码示例1
public class NameOf
    {
        public static String nameof(Expression> name)
        {
            MemberExpression expressionBody = (MemberExpression)name.Body;
            return expressionBody.Member.Name;
        }
    }