Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有没有办法让 F# 类中的可变静态变量与 C# 类中的静态变量相同?
您使用static let绑定(注意:虽然有时是必要的,但它并不太实用):
static let
type StaticMemberTest () = static let mutable test : string = "" member this.Test with get() = test <- "asdf" test