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

Popular posts from this blog

javascript - Chart.js (Radar Chart) different scaleLineColor for each scaleLine -

apache - Error with PHP mail(): Multiple or malformed newlines found in additional_header -

java - Android – MapFragment overlay button shadow, just like MyLocation button -