Insert interaction types in F #

Is it possible to insert interaction type in F #?

At first I do not see the possibility of doing this in the links.

Secondly, if I embed a type in C #, it tells me to refer to an interface, not a specific class:

//DBEngine is the interface DBEngineClass is the concrete class //if I dont embed the interop //Valid var dbe = new Microsoft.Office.Interop.Access.Dao.DBEngineClass(); //Valid var dbe = new Microsoft.Office.Interop.Access.Dao.DBEngine(); //if I do embed the interop //Invalid var dbe = new Microsoft.Office.Interop.Access.Dao.DBEngineClass(); //Valid var dbe = new Microsoft.Office.Interop.Access.Dao.DBEngine(); 

However, F # always wants to have a reference to a specific class. Is there any way around this?

+4
source share
2 answers

Tao Liu talks about some extra work you have to do with F # to find the right class to create here . As far as I know, there is no way to embed interaction types. I would be happy to be mistaken. :)

+2
source

I may not understand your question, but this works just fine, citing v14.0:

 open Microsoft.Office.Interop.Access.Dao let dbe = DBEngineClass() :> DBEngine 
+1
source

All Articles