F# CLIMutableAttribute default constructor

Viewed 69

In F#, CLIMutableAttribute is used to make record types usable with CLI. For example, it adds a default constructor.

Apparently, though, there is a discrepancy here in respect to C#. C#, in fact, allows us to define the default constructor and use it to set default values during construction. Is this possible in F#?

The usual way to create F# record default values is using a function or a static method, but this doesn't work if the construction is managed by a library.

It seems that in this case there is no equivalent in F# than in C#, so that I need to use class types instead of record types. Am I right?

0 Answers
Related