public class NameOf { public static String nameof(Expression> name) { MemberExpression expressionBody = (MemberExpression)name.Body; return expressionBody.Member.Name; } }
By Marlene Stehr at Mar 24 2020