C# object initialization syntax in F#

后端 未结 3 760
攒了一身酷
攒了一身酷 2021-01-17 11:12

Please note: this question is not the same as this question.

I recently came across some C# syntax I hadn\'t previously encountered:

Is there any wa

3条回答
  •  借酒劲吻你
    2021-01-17 11:21

    F# 4.0 came out with a feature which might be useful to encapsulate @plinth's answer. It allows the creation of extension properties, which can be initialized in the constructor.

提交回复
热议问题