c# - Method chains with nameof operator -
if nameof(instance.someproperty)
, evaluates "someproperty"
.
is there way can entire method chain "instance.someproperty"
?
i know nameof(instance) + "." + nameof(instance.someproperty)
, there better way that's more maintainable?
is there way can entire method chain "instance.someproperty"?
nope. can, however, similar other solution:
$"{nameof(instance)}.{nameof(instance.someproperty)}"
you can try here.
Comments
Post a Comment