[英]How to define a F# abstract member with empty type-signature
在F#中,通常使用unit
类型,而在C#中将使用void
关键字。 因此,您正在寻找的示例是:
[<AbstractClass>]
type MyAbstractClass() =
abstract MyMethod : unit -> unit
type MyDerivedClass() =
inherit MyAbstractClass()
override this.MyMethod() = printf "Do something here..."
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.