title: F# interfaces and properties
body: <p>I'm trying to get a grip on F#, and in the process I am converting some C# code. I'm having some trouble with defining properties in an interface and implementing them in a type. </p>
  
  <p>Consider the following code:</p>
  
  <pre><code>module File1
  
  type IMyInterface =
      abstract member MyProp : bool with get, set
      abstract member MyMethod : unit -&gt; unit
  
  type MyType() = 
      interface IMyInterface with
          member val MyProp = true with get, set
          member self.MyMethod() = if MyProp then () else ()
  </code></pre>
  
  <p><a href="https://msdn.microsoft.com/en-us/library/dd483467.aspx" rel="noreferrer">The documentation for F# properties</a> appears to state that my implementation of MyProp in MyType is correct, however, the compiler complains that "The value or constructor 'MyProp' is not defined". Any ideas?</p>