F# extension methods in C#

后端 未结 4 1034
死守一世寂寞
死守一世寂寞 2020-12-02 10:23

If you were to define some extension methods, properties in an assembly written in F#, and then use that assembly in C#, would you see the defined extensions in C#?

4条回答
  •  [愿得一人]
    2020-12-02 11:10

    Per the language spec, section 10.7 "Type extensions":

    Optional extension members are syntactic sugar for static members. Uses of optional extension members elaborate to calls to static members with encoded names where the object is passed as the first argument. The encoding of names is not specified in this release of F# and is not compatible with C# encodings of C# extension members

提交回复
热议问题