Writing CLS compliant code in F#

前端 未结 1 1633
逝去的感伤
逝去的感伤 2021-01-12 11:16

I am very new to F# and I started to write my functional wrapper on top of OpenGL. I also intend to use it to write a graphics engine which should have interop with all .Net

1条回答
  •  盖世英雄少女心
    2021-01-12 11:54

    Use the CLSCompliant attribute. It will guarantee that your code is CLS-Compliant at compile time.

    Like this:

    module myProject.AssemblyInfo
    
    open System
    
    []
    
    do()
    

    Source: Mike-Ward.Net: Learning F#–Assembly Level Attributes

    For a more complete discussion of the CLSCompliant attribute, see C# Corner: Making Your Code CLS Compliant

    0 讨论(0)
提交回复
热议问题