gpt4 book ai didi

.net - 为什么F#无法打开静态类?

转载 作者:行者123 更新时间:2023-12-02 02:13:05 25 4
gpt4 key购买 nike

我认为模块被编译为静态类 .NET IL 代码。我可以打开命名空间和模块,但为什么不能打开静态类?

printfn "Hello, World!"

open System.Console
WriteLn("Hello, World!")

最佳答案

现在支持此功能,starting with the F# 5 release :

open type System.Console

WriteLine "Hello World!"

关于.net - 为什么F#无法打开静态类?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45396557/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com