http://community.csdn.net/Expert/topic/3622/3622739.xml

解决方案 »

  1.   

    为了结帖,回答这个问题也可以,请问我用vb写了一个dll,在csharp中调用,可是报错如下无法从“string”转换为“ref string”
    在vb中定义一个
    Public Function test(aa As String) As String
        test = "This is " & aa
    End Functioncsharp中:
    TTcom.TCom1 tt=new TTcom.TCom1();
    tt=(TTcom.TCom1) Server.CreateObject("TTcom.TCom1");
    string c;
    c="test";
    c=tt.Name(c);----这行就报错了,参数“1” : 无法从“string”转换为“ref string”
    请问为什么?
      

  2.   

    tt.Name(ref c)我试过了,一样报错无法将类型“object”隐式转换为“string”