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.
根据这个页面,一个类的所有抽象成员都必须有一个type-signature. 但我想定义一个具有 void 输入参数和 void 返回类型的抽象类。并且void在这种情况下不是有效的关键字。
type-signature
void
在 F# 中,您通常使用在 C# 中使用关键字的unit类型。void所以你正在寻找的一个例子是:
unit
[<AbstractClass>] type MyAbstractClass() = abstract MyMethod : unit -> unit type MyDerivedClass() = inherit MyAbstractClass() override this.MyMethod() = printf "Do something here..."
我正在使用这个正则表达式来尝试查找看起来像这样的链接,并将它们替换为仅链接的开始和结束标记之间的内容。
正则表达式:
/<a class="tag_link"[^>]*>([^<]*)<\/a>/mg
我在示例代码上测试了正则表达式并且它可以工作,但是当我尝试