在F#中,属性用于启用程序代码构造的元数据。属性可以应用于任何结构,如函数、模块、方法和类型。
语法:
[<target:attribute-name(arguments)>]
open System [<Obsolete("Do not use. Use newFunction instead.")>] let updateSystem() = printf "updating..." updateSystem
输出:
链接:https://www.learnfk.comhttps://www.learnfk.com/fsharp/f-sharp-attribute.html
来源:LearnFk无涯教程网
attributes.fs(118,1): warning FS0044: This construct is deprecated. Do not use. Use newFunction instead.
祝学习愉快!(内容编辑有误?请选中要编辑内容 -> 右键 -> 修改 -> 提交!)
Spring Cloud 微服务项目实战 -〔姚秋辰(姚半仙)〕