The name may be a little confusing, so I will explain. Say you had this call chain ...
public DoWork(index) >> private DoWorkHelper(index) >> private CheckIndex(index)
Now, if you call DoWork , it bypasses the calls to CheckIndex , adding each deeper call to the call stack.
Now, if someone calls DoWork with a bad value for index , it throws an exception to the end in CheckIndex and now, when the debugger breaks. Then you need to go back to the call stack to see that the real culprit is that someone passed bad data to DoWork .
Now, in the days of VB6, you can simply decorate DoWorkHelper and CheckIndex attribute to say: "If any exception is thrown at me, do not select me, but rather my caller, because they were the ones, it ruined me! Therefore, this In this case, the code will be broken inside DoWork with a dedicated call to DoWorkHeper .
There was also a parameter to disable this, so for deeper debugging purposes it can still be reset to CheckIndex , the level where it actually happened, but for half the time, crashing there, says nothing, because you don’t know how did you get there without raising a stop call.
Think about this to decorate your code, to say when you click on the exception, automatically go to the call stack to the point where a really bad value tells you something useful.
Note that this is similar to “Break On All Exceptions”, except that you process it through a decoration. In addition, you do not set gaps for a specific type of exception (for example, all null reference exceptions, etc.), but rather a specific method! (more precisely, the one called the decorated method.)
So, does C # or .NET have this at all?
Update
While I am responsible for the Dark Falcon for the answer, since it directed me there, I have added a more detailed explanation of what all attributes mean and in what context. Check it out below.