The <tt>AccessTools</tt> methods for constructors (<tt>DeclaredConstructor</tt>, <tt>Constructor</tt>, and <tt>GetDeclaredConstructors</tt>) no longer match static constructors by default. Pass <tt>searchForStatic: true</tt> to the methods if needed.
+
The <tt>AccessTools</tt> methods for constructors (<tt>Constructor</tt>, <tt>DeclaredConstructor</tt>, and <tt>GetDeclaredConstructors</tt>) no longer match static constructors by default. Use the new <tt>searchForStatic</tt> argument if you need to match them:
+
+
<source lang="c#">
+
// match static constructors only
+
var method = AccessTools.Constructor(typeof(ExampleType), searchForStatic: true);
Note that Harmony no longer matches static constructors for a good reason — they're only called once for the type, so often static constructor patches won't work correctly.