🇵🇸 Call for a #CeasefireNOW 🇵🇸

Act Now

Beware of Static Constructors

In Bunian we needed to use a static constructor for some reason, it was all going good; we tested the code and it ran smoothly…excellent (Code Coverage anyone?!). But when I came across this situation, it appeared that the static constructor wasn’t invoked!even when “Class.Method();” is called! so lets examine it. I have two simple classes as an Example: public class Parent { public static string DoSomething() { return “Parent: DoSomething() called”; } } public class Child : Parent { ...

February 6, 2009 Â· Emad Alashi