title: How to have an exposed static constant member in F#?
body: <p>I'm attempting to convert the following code from C# to F#:</p>
  
  <pre><code>public class MyType
  {
      public const short N_CONST = 8;
  }
  </code></pre>
  
  <p>It is currently used as a constant in the following snippet:</p>
  
  <pre><code>new byte[MyType.N_CONST] { 8, 8, 8, 8, 8, 8, 8, 8 };
  </code></pre>
  
  <p>(only a constant is legal in this context).</p>
  
  <p>In attempting to convert this, I've come up with two possibilities:</p>
  
  <ol>
  <li><p><code>static let</code></p>
  
  <pre><code>type MyType =
      [&lt;Literal&gt;] 
      static let N_CONST = 8s
  </code></pre>
  
  <p>This fails to compile in the consuming code, as <code>N_CONST</code> is not exposed.</p></li>
  <li><p><code>static member val</code></p>
  
  <pre><code>type MyType =
      [&lt;Literal&gt;]
      static member val  N_CONST = 8
  </code></pre>
  
  <p>This fails to compile at the definition, disallowing the <code>[&lt;Literal&gt;]</code>.</p></li>
  </ol>
  
  <p>(How) can I support the consuming code?</p>