classe pública Nomeof {public static string nameof (expressão > nome) {memberexpression expressãobody = (memberexpression) name.body; retornar expressãobody.member.name; }}

public class NameOf
    {
        public static String nameof<T>(Expression<Func<T>> name)
        {
            MemberExpression expressionBody = (MemberExpression)name.Body;
            return expressionBody.Member.Name;
        }
    }
Wicked Whale