The sample you will find in the .net base class library is the ThrowHelper template. In essence, it reduces the number of byte codes for each method.
Anyway, I was wondering if an attribute directive exists to stop the error caused by calling throw helper inside the helper. I would prefer the debugger to stop at the calling line.
i.e.
ThrowHelper.ThrowAnException ()
not inside ThrowAnException ()
source share