The ClassInitialize attribute known as correct prior to your course is loaded (but once the static constructor) plus the ClassCleanup is referred to as right after your class is unloaded. It is also achievable to manage the inheritance habits: just for current class applying InheritanceBehavior.None, or for all derived classes https://kylerpvtsz.amoblog.com/the-ultimate-guide-to-hbr-case-studies-57693903