Define a static property for F# class

it's quite easy to define a modifiable static property in C# , but in F#,a defined static filed is required  first when the class want to define a static property.

  

type StacitMemberCls() = 
    //A static filed should be defined first
    static let mutable staticFiled = ""  
      
    static member StaticProp
        with get() = staticFiled
        and set(v) = staticFiled <- v
原文地址:https://www.cnblogs.com/FsharpZack/p/2758798.html