4 ms·
1. You're probably not using this on every other method, and the name is consistent with other features in the same vein (CallerMemberNameAttribute, etc.). 2.
by ygra 5y ago
1. You're probably not using this on every other method, and the name is consistent with other features in the same vein (CallerMemberNameAttribute, etc.).
2. Something like nameof wouldn't really work here as the idea is to re-use both evaluation of an expression _and_ the textual form. nameof doesn't evaluate its argument. So a similar solution would require you to write your expression twice.
- LadyCailin 5y ago`expressionfor(argument)` for instance doesn’t require modifying the signature manually, and should work similarly to nameof(argument).