Static constructor in C#

added by baldi
5/25/2010 1:53:11 AM

0 Kicks, 61 Views

When you work with static class variables, the static constructor allows you to create much cleaner code. It gives you the ability to execute code before one of the static methods of the class are executed. You are able to initialize the static variables of your class with no lock of if statement.