F# Constructor

*爱你&永不变心* 提交于 2020-01-03 11:58:08

问题


How do I do things in a constructor in F#? I cant quite figure it out...


回答1:


I would check out Constructors (F#):

Objects of class types have constructors. There are two kinds of constructors. One is the primary constructor, whose parameters appear in parentheses just after the type name. You specify other, optional additional constructors by using the new keyword. Any such additional constructors must call the primary constructor.



来源:https://stackoverflow.com/questions/984588/f-constructor

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!