Menu

Home

James Hardaker

Example:

[<ReflectedDefinition>] 
module Functions =

    //must declare delegate with same name as let bound function
    type Add = delegate of int * int -> int      
    let Add(a,b) = a + b

open Functions
module Host =
    let main() =
        //get function pointer to exported C++ function
        let m = FunctionPointer<Add>
        Assert.AreEqual(m.Invoke(1,2),Add(1,2))

Supported F# Language Features
Unsupported F# Language Features


Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.