在F#中,您通常使用在C#中unit使用void关键字的类型.所以你要找的是一个例子:
[<AbstractClass>]
type MyAbstractClass() =
abstract MyMethod : unit -> unit
type MyDerivedClass() =
inherit MyAbstractClass()
override this.MyMethod() = printf "Do something here..."
Run Code Online (Sandbox Code Playgroud)