delphi中如何调用C#写的dll中的类,

解决方案 »

  1.   

    可以调用标准dll,c#类型的dll不行
      

  2.   

    这是C#写的dll
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;namespace Dlltest
    {
        public class DllClass
        {
            public int add(int a, int b)
            {
                return a * b;
            }
        
        }
       
    }
    现在我要在delphi中调用DllClass类的add方法,什么调用
      

  3.   

    var FComLib: variant;FComLib := CreateOLEObject('xxxxx.xxxxx');
      

  4.   

    要把 C#公开为COM,然后按COM的方式调用
      

  5.   

    哈哈,我迟些都会学习在Delphi下调用Dll
    如果能调用Dll,岂不是很好,能Delphi 与 C#相结合。