#define nameof_ | ( | ... | ) |
#include <xtd.core/include/xtd/nameof.h>
Used to obtain the simple (unqualified) string name of a variable, type, or member.
When reporting errors in code, hooking up model-view-controller (MVC) links, firing property changed events, etc., you often want to capture the string name of a method. Using nameof helps keep your code valid when renaming definitions. Before, you had to use string literals to refer to definitions, which is brittle when renaming code elements because tools do not know to check these string literals.
A nameof expression has this form: