Lead Product Evangelist @Kentico, Founding partner @craftbrewingbiz. love to learn / teach web dev & software engineering, collecting vinyl records, mowing my lawn, craft 🍺
I've used this in the past for some internal infrastructure pieces... but the one thing I don't like about this attribute is that it requires you to add a parameter to a method that the caller should not use.
It's like I create an API and expose something that I don't want the caller to use.
I've used this in the past for some internal infrastructure pieces... but the one thing I don't like about this attribute is that it requires you to add a parameter to a method that the caller should not use.
It's like I create an API and expose something that I don't want the caller to use.
This breaks several SOLID principles and is downright confusing for those not familiar with how the
[CallerMemberName]
attribute works.So, I normally don't expose any infrastructure that uses it and I try to keep its use very limited.
That said, it can be useful, and I'm sure there are devs out there that will discover it through this post.
Thanks!