title: How does a static constructor work?
body: <pre><code>namespace MyNameSpace
  {
      static class MyClass
      {
          static MyClass()
          {
              //Authentication process.. User needs to enter password
          }
  
          public static void MyMethod()
          {
              //Depends on successful completion of constructor
          }
      }
  
      class Program
      {
          static void Main(string[] args)
          {
              MyClass.MyMethod();
          }
      }
  }
  </code></pre>
  
  <p>Here is the sequence which I assumed</p>
  
  <ol>
  <li>Start of static constructor</li>
  <li>End of static constructor</li>
  <li>Start of main</li>
  <li>Start of MyMethod</li>
  <li>End of main</li>
  </ol>
  
  <p>Now in any scenario if 4 will start before 2 I am screwed. Is it possible?</p>