I’m currently building a c++/cli interop library. The library will be consumed by c# and vb.net applications, and I would like to make use of .Net 4 dynamic typing. I have a configuration module that uses dynamic member access to refer to configuration keys, this works fine in c# but is giving me trouble in c++/cli (not entirely unexpected)
Is there any way to use this library in C++/CLI (e.g. by invoking TryGetMember() directly or something)? If the C++/CLI library then passes the dynamic configuration to a derived class written in C#, will the C# still be able to use dynamic member access? Note that the base class is defined in c++/cli, so I wouldn’t be able to use the dynamic keyword. (or would I?)
I’m currently building a c++/cli interop library. The library will be consumed by c#
Share
There is an open source library, ImpromptuInterface (found via nuget) that simplifies the api’s used by the c# compiler when the dynamic keyword is involved, I’d assume it works in c++/cli, since they are just static c# functions. I know it works in F# that also doesn’t have DLR support.
Here is a list of dynamic invoking it can do.