InvalidCastException When using ActiveX in C# project

前端 未结 1 1833
孤街浪徒
孤街浪徒 2020-12-20 06:03

Dear all trader and API Gurus,

Thank you in advance.

Background:

  1. Visual Studio 2010, C# Language, ActiveX OCX API as reference of project.
相关标签:
1条回答
  • 2020-12-20 06:28
    //Try changing the way that you implement the Interface / Clase where you have 
    // -- var auduse = new Contract();
    
    //depending on boxing and unboxing from this point try to reverse it and do the following
    IContract iaudUse = new Contract();
    //then you would use iaudUse. what ever method in the Interface that you are wanting to use.
    
    0 讨论(0)
提交回复
热议问题