How to use a dll written for VB.Net in C#

后端 未结 3 1219
无人共我
无人共我 2021-01-26 07:53

I have question to ask.

I have a dll file written for reading&writing data on USB. To use dll in VB.Net, one needs to integrate a .vb file which interface to that dl

3条回答
  •  谎友^
    谎友^ (楼主)
    2021-01-26 08:27

    Reference the C# dll in the VB project (or just drop the dll into the /bin folder)

    As you know, you need to adapt the VB.NET code in the form class to C#.

    In Answer to your question instead of a call from VB.NET Form codebehind:

    iConnectToHID(Me)
    

    You would use

    iConnectToHID(this);
    

提交回复
热议问题