title: F# Guid.Parse TypeInitializationException
body: <p>I'm working on a WebApi project written in F#. Here a snippet:</p>
  
  <pre><code>module MyModule
  
  open System
  
  let MyGuid = Guid.Parse "934F0B12-D00A-491D-862D-EE745EF3C560"
  
  let myFunction list = 
      list.Get(MyGuid) // --&gt; here MyGuid has the TypeInitializationException before list.Get is called 
  </code></pre>
  
  <p>By debugging I can see that the MyGuid actually has an error</p>
  
  <p>Changing the code followings, it works:</p>
  
  <pre><code>module MyModule
  
  open System
  
  let MyGuid () = Guid.Parse "934F0B12-D00A-491D-862D-EE745EF3C560"
  
  let myFunction list = 
      list.Get(MyGuid())
  </code></pre>
  
  <p>I actually know the MyGuid of the first example is a variable and the second one a function definition, but why does the first rise the exception? I my code MyGuid is used some times. so in the first example I'd have only one instance, in the second a new instance every time MyGuid is called...</p>