Why CallerClassName (or CallerTypeName or similar) attribute does not exist?
07:49 14 Aug 2018

There are some attributes like CallerMemberName in C# that are quite handy especially for the logging purposes. What seems to be lacking is CallerClassName so that we can easily log something like this without explicitly passing this or a string with the class name:

Exception happened during MyClass.MyMethod execution

Are there any restrictions that makes it easy to know the method but not class or is it just a missing feature that we probably can ask to add?

c# .net attributes