fsprojects / FSharp.Interop.Dynamic

DLR interop for F# -- works like dynamic keyword in C#
https://fsprojects.github.io/FSharp.Interop.Dynamic/
Apache License 2.0
95 stars 14 forks source link

How can I invoke a dynamic object? #21

Closed lostmsu closed 5 years ago

lostmsu commented 5 years ago

I have an Invokable object returned from a C# property of type dynamic. In C# I can do MyClass.Invokable(some, parameters, here).

However, in F# MyClass.Invokable?() leads to error FS0010: Unexpected symbol ')' in expression

What is the correct syntax to make this call?

jbtule commented 5 years ago

!? MyClass.Invokable (some, parameters, here)

If i understand this correctly to be a static property Invokable on class MyClass

https://github.com/fsprojects/FSharp.Interop.Dynamic/blob/739f519d1277de69315015b8e47045f90f67c6b3/FSharp.Interop.Dynamic/TopLevelOperators.fs#L23-L33

lostmsu commented 5 years ago

@jbtule should add it to the README